karma-browserstack-launcher
karma-browserstack-launcher copied to clipboard
Use higher default pollingTimeout than 1 second
BrowserStack implemented rate limiting for their API, currently 120 requests/min. The 1s pollingTimeout, combined with other requests, makes it likely to quickly hit that limit.
browserstack-runner has a default polling interval of 2 seconds.
A better solution would be to use a global pool queue instead of separate ones for each browser - current solution will always hit the limit if the number of browsers is high enough.
+1 to finding a way around the limit
+1
+1 - I've been talking with BrowserStack about this but I haven't gotten very far.
I get this when I run 70 tests in 2 browsers even with pollingTimeout set to 10 seconds, (as recommended by BrowserStack.)
Their rate limit seems a bit severe.
::end rant::
Looks like you can get all workers in a single API call, (GET /workers
) to implement the pool option that @mzgol mentioned.
@johnjbarton maybe you could change the default timeout to 10000 in this package and release a new version?
Did you try the suggestion in #159?
If you mean the suggestion in https://github.com/karma-runner/karma-browserstack-launcher/issues/159#issuecomment-582837942, I haven't tried that yet. I can try it but it's hard to reproduce unless I push many PRs at the same time.
So, just so that we are on the same page, the suggestion is to use this?
captureTimeout: 30000,
browserDisconnectTimeout: 30000,
browserDisconnectTolerance: 3
browserNoActivityTimeout: 30000,
browserSocketTimeout: 12000,
Someone else should try this values too. From https://github.com/karma-runner/karma-browserstack-launcher/issues/61#issue-129246470 I see mentioning only these values:
captureTimeout: 30000,
browserDisconnectTimeout: 30000,
browserDisconnectTolerance: 3
browserNoActivityTimeout: 30000,