node-testswarm
node-testswarm copied to clipboard
Timeout doesn't work?
(migrated from https://github.com/jquery/infrastructure/issues/276)
Timeout option doesn't seem to work. I had it specified for jQuery Core Weekly for 2 hours and yet the run: http://jenkins.jquery.com/job/jQuery%20Core%20Weekly/58/ went for over 1.5 days; the long run was caused by testswarm-browserstack problem but it still should be killed after two hours. Here's the task configuration: https://github.com/jquery/jquery/blob/master/build/tasks/testswarm.js and it was run via:
grunt testswarm:39b76064d9400295a383291ab6e821e259b67832:/usr/local/bin/tools/node-testswarm-config.json:jqueryweekly:weekly-no-old-ie:3600000
I reviewed the timeout related code in this module, along with the testswarm task in jQuery Core. So far I haven't found anything indicating the root of this issue.
I'll walk through the things I checked, maybe that helps to figure out what I'm missing:
First, the timeout check itself happens after the doContinue check: https://github.com/jzaefferer/node-testswarm/blob/b0a16222523a9ae6f6630bbad56e30a180d64561/lib/testswarm.js#L42 - if that's false, its done anyway, so no timeout check is needed. If it should continue, it checks for the timeout. The timeout check itself looks fine (compare start plus options.timeout to Date.now()).
I also looked at the doContinue callback. That essentially passes of the data to the isJobDone function, which returns false when at least one run has status new or progress. Since that doesn't appear anywhere in the broken run, it doesn't look it there's anything wrong here either.
What am I missing?
I'll try to look into it. Meanwhile, another run that was going for over 6 days before I killed it: http://jenkins.jquery.com/job/jQuery%20Core%20Weekly/65/ Neither TestSwarm timeout nor the one provided by the Jenkins plugin doesn't work.