-
Notifications
You must be signed in to change notification settings - Fork 41
Process exits with 1 minute delay #5
Comments
@tscheinecker I would be very much interested in tracking down all the timeouts that we might have missed.... but to do so I will need a minimal project that reproduces the issue plus more info about node version used. Could you put together a repository with a minimal reproduce scenario? Are you facing the same issue with the sample project from this repo? |
@pkozlowski-opensource i use node 0.10.26 and yes i can reproduce it with the sample project from this repo - the output i posted above is from that exact test |
@tscheinecker hmm, this sounds like something possibly windows / particular node version specific. Here is the output I'm getting with node 0.10.21 on Mac:
and indeed Karma exists immediately. I've tested the same correct behaviour on Linux (ubuntu). I can dust off my old win machine and try to test if this is indeed Windows specific, but you could also help debugging this but putting somewhere here (in your local node_modules karma folder): console.log(process._getActiveHandles()); that should list all the timers that might block Karma's exit. |
@pkozlowski-opensource thanks for the info
and here's the output when I put it at line 230:
|
I'm seeing something similar. I upgraded to node on Windows to check but still happens on latest. Mac (0.10.25): Runs and exits perfectly. Gulp: 3.6.2 |
@philjones88 thnx for the info. So, for now it looks like something specific to Windows... |
@tscheinecker @philjones88 this sounds odd... The only timeout of ~1 minute seems to be coming from the _onTimeout method that existed only in the very old version of Karma.... Anyway, need to dig into this on my Win machine. |
OK, managed to reproduce this on Windows. The timeout that prevents node process from existing is coming from socket.io (yeh, another one...): For now I'm not sure why it happens on Win only and how to clear this timeout so if there are people more familiar with the socket.io code - any help would be appreciated. |
@pkozlowski-opensource thanks for investigating this issue |
I have the same problems on windows (delay of ~1 min before exit). |
@maku in fact yes. Just yesterday a colleague of mine found a work-arround that could be applied on Karma, see karma-runner/karma#1109 for more details. Let's wait for input from other Karma contributors and eventually work-around this in Karma. The other option is to fix the issue in the socket.io itself, but I'm not sure how likely they are to accept a patch to the 0.9.x line. |
@pkozlowski-opensource : thanks for answering. I added "sockets[key].disconnect();" locally in server.js and now it works as expected. I hope that a final solution is not far away. |
@pkozlowski-opensource : Thanks for the link. Instead of directly modifying the karma source, I monkey-patch it at the top of my
|
Good news - the latest version of Karma (0.12.17) contains a fix that solves this issue! Yay! |
I still get this bug ... exit after 1 minute. Yet, I'm on node 5.4.0 with gulp 3.9.0 and karma 0.13.19. |
+1 I work around the problem by explicitly specifying |
This is being tracked in karma-runner/karma#1788 |
@pkozlowski-opensource if you got a moment to look into this, as you were able to track this down the last time I'd appreciate it. |
Still get this. There is huge delay for exit. |
Still an issue.. |
I currently use gulp-karma for executing my tests from within gulp but as I'm no fan of all the gulp wrappers around existing functionality I wanted to switch to the proposed method described here. The setup and configuration was pretty straight forward but somehow karma prevents the whole process from shutting down (It does so eventually - with 1 minute delay to be specific).
My issue can be seen by the following output (i added a small wrapper which prints timestamps before and after executing gulp):
After some research I discovered that this isn't a 'new' issue, but should be fixed in the latest release (0.12.16).
The issues i found:
#3
karma-runner/karma#1035
karma-runner/karma#1054
The text was updated successfully, but these errors were encountered: