-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When used with gulp causes gulp process not to close for around 2 minutes #4
Comments
Hi, @keirlawson Thanks for the reporting this issue. Can you please provide a minimal working example for me to reproduce it? |
Minimal working example here: https://gist.github.com/keirlawson/ede918f818a49f21dc02 |
I'm seeing this issue as well. Works fine with the chrome launcher but hangs with jsdom. |
I was able to solve this problem by changing the gulp task named "test" in this example in gulpfile.js; https://gist.github.com/keirlawson/ede918f818a49f21dc02 to this: gulp.task('test', function (done) {
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true
}, function(exitStatus) {
let returnMessage = undefined;
if(exitStatus === 1) {
returnMessage = 'Unit tests failed.';
}
done(returnMessage);
process.exit(exitStatus);
).start();
}); |
I'm sorry for taking so long in coming back to you. I've been having quite a hard time debugging this issue. @jeromeyackley is right in that explicitly exiting the process will solve the issue and for the time being, it is the only solution. What happens is it that some handler created by jsdom or the Karma application itself is lingering and preventing node from exiting. Gulp itself won't explicitly exit, it will simply clean up after itself and expect that to be enough. This issue is also mentioned in EG. gulp-mocha. I'll make sure it gets into the readme. |
I've tried to solve this with 119ab34 and released it as |
Yep, looks like its fixed, time with 6.1.5:
with 7.0.0-rc1:
|
Great! I've published 7.0.0, which is identical to that which was rc1. |
Using Node 4.2.4 with various versions of Karma 0.13.x with even the simplest test suites and karma configurations, using gulp to invoke karma means that after the task completes successfully I have to wait around 2 minutes or so for gulp to finally terminate. I do not experience this issue with other launchers.
The text was updated successfully, but these errors were encountered: