You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run karma start config.js with a bare-bones config (an empty browsers list is fine)
navigate a random browser window / tab to http://localhost:9876/ (I can reproduce with both chrome & firefox)
once connected, press ctrl-c in the karma start terminal window
Nothing happens.
After you close the browser tab, still nothing happens.
Eventually you resort to a kill -9 on it.
This happens in the newly released 0.12, but used to work fine in previous versions.
I originally though this was a regression (when I first tried karma it had trouble exiting without a kill -9). But it turns out it does exit eventually after you close the last browser tab, but only after a few minutes.
I did some digging, it seems to be that disconnectBrowsers in server.js calls webServer.close() with a callback function, and webserver.close() waits until everything is totally disconnected before calling the callback. Despite having no browser connected to the server (after I closed it), it takes a couple of minutes for this to happen. I guess it's waiting for connections to time out?
Whatever it's doing, it's frustrating to have to wait minutes, fish out the karma server PID to kill it explicitly, or killall -9 node (and hope that I'm not running any important node processes).
Tested on linux (fedora 20, nodejs 0.10.26).
The text was updated successfully, but these errors were encountered:
I'm also seeing this issue. Ubuntu 12.04, node v0.10.26, karma 0.12.1.
One thing possibly different I am doing is connecting to karma from a browser not on localhost. Running karma on a separate server and connecting to karma using Chrome on my laptop: mydomain.com:9876
Agree with @dignifiedquire, this should be fixed by #973. There are still a couple of places where timeouts prevent Karma from exiting ASAP, but those are tracked already by PRs / issues:
karma start config.js
with a bare-bones config (an empty browsers list is fine)karma start
terminal windowNothing happens.
After you close the browser tab, still nothing happens.
Eventually you resort to a
kill -9
on it.This happens in the newly released 0.12, but used to work fine in previous versions.
I originally though this was a regression (when I first tried karma it had trouble exiting without a
kill -9
). But it turns out it does exit eventually after you close the last browser tab, but only after a few minutes.I did some digging, it seems to be that
disconnectBrowsers
in server.js calls webServer.close() with a callback function, and webserver.close() waits until everything is totally disconnected before calling the callback. Despite having no browser connected to the server (after I closed it), it takes a couple of minutes for this to happen. I guess it's waiting for connections to time out?Whatever it's doing, it's frustrating to have to wait minutes, fish out the karma server PID to kill it explicitly, or
killall -9 node
(and hope that I'm not running any important node processes).Tested on linux (fedora 20, nodejs 0.10.26).
The text was updated successfully, but these errors were encountered: