closeBrowser is not called in browserstack when the test is in the queue
What is your Test Scenario?
Running some test on browserstack when the allowed parallel tests have reached it upper limit.
What is the Current behavior?
Browser is not closed when trying to kill a test that is in the queue.
What is the Expected behavior?
Browser should be closed regardless whether the test is running or in a queue.
What is your web application and your TestCafe test code?
Any simple test should be fine.
Steps to Reproduce:
- Prepare some tests written in testcafe, link the dependency of testcafe-browser-provider-browserstack to this updated repo.
- Prepare a test account in browserstack
- Run some tests and make sure it browserstack reaches its subscription limitation.
- Start a new test, for example
$ yarn testcafe browserstack:ie my-test.js
yarn run v1.10.1
$ /Users/daniel.han/git/.../node_modules/.bin/testcafe browserstack:ie tests/functional/my-test.js
⠙
Daniel Han >>>>>>>>> init
⠴
Daniel Han >>>>>>>>> isValidBrowserName ie
⠦
Daniel Han >>>>>>>>> openBrowser y_KXdxg http://10.3.222.225:56298/browser/connect/y_KXdxg ie
At this monent the new test will be saved into a queue of browserstack (due to a bug in browserstack the size of queue can be infinite, but don't bother about that for now)
- Kill the test by killall node
Normally when the you kill a running job,
closeBrowserwill be called. But in this case, when the job is in the queue, it will not be called. As a result the test will be hanging on browserstack for 30 minutes until the whole session times out.
For more information about the debugging code please check out here: https://github.com/hex0cter/testcafe-browser-provider-browserstack
Hi @hex0cter
Thank you for the example. It helped us debug your use case. We need some time to investigate it more deeply.
@miherlosev - Do we have any update on this thread?
Unfortunately, we need to heavily rewrite our browser handling pipeline to fix this issue. Could you please share more details about this issue? If I understood correctly, it happens only if you cancel a TestCafe session that waits for a browser from BrowserStack?
That is correct @AndreyBelym
@hex0cter
Thank you for the provided information. We will continue working on this issue.
This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open.
We're closing this issue after a prolonged period of inactivity. If it still affects you, please add a comment to this issue with up-to-date information. Thank you.