tomsterritt
tomsterritt

Reputation: 512

Process hangs after tests complete successfully

Our tests are all running successfully and completing, and we see the coverage summary & following table with TOTAL: tested X platforms, 0/X tests failed however the process then seems to hang.

I had been able to run them using Intern 3.0.3 however since trying a newer version it now seems to hang all the time (even if I specify version 3.0.3)...

I understand there are problems with Browserstack and we have had problems that turned out to be there before, however it's difficult to tell if this would in fact be a Browserstack issue? Is it still with Browserstack after the coverage tables are displayed?

Upvotes: 1

Views: 417

Answers (2)

Nishant
Nishant

Reputation: 66

Yes, mattjbones is correct. The BrowserStackLocal did not seem to be terminated after sending SIGINT. However, I tried running Intern tests using the new version of the binary (v5.2) they released today and everything works great now! Can you guys try it out?

Upvotes: 0

mbarnettjones
mbarnettjones

Reputation: 131

Update: This has now been addressed with an update to digdug/BrowserStackTunnel.js and looks like it'll form part of the 1.5.0 DigDug release.


I took a look into this, I'm new to Intern and I thought it'd be a good way to learn.

After spending a bit of time tracing through Intern's Runner and Executor modules I finally landed in the DigDug Tunnel module. After adding a few console.log here and there I found the line it was hanging on (digdug/Tunnel.js:554):

childProcess.kill('SIGINT');

This line is responsible for closing the Tunnel (which in my case was to BrowserStack). I was able to get the runner to exit cleanly by simply changing from SIGINT to SIGTERM.

The question is, why doesn't it work with SIGINT? (According to wikipedia; it's nearly identical to SIGTERM). The original question mentioned issues with BrowserStack (for ref I'm using v5.1 of the BrowserStackLocal for OS X) so in all likelihood there is still an issue here. But I could see no documentation on the binary.

That said, I noticed on the BrowserStack automate website that all the sessions are closed correctly and the runs are correctly labelled by Intern via the BrowserStack REST API as pass / fail etc. So, could there be something within Intern hanging onto the Tunnel?

Upvotes: 2

Related Questions