-
Notifications
You must be signed in to change notification settings - Fork 41
Don't exit process when single-run #3
Comments
+1 if there is anything funny about Karma not exitting cleanly, we should On Sun, Apr 13, 2014 at 11:50 AM, Pete Bacon Darwin <
|
OK, after digging into it some more I can confirm that something in karma blocks the node process from exiting. Not sure what is going on exactly, but after the web server's Interestingly, if we remove flash from socket's transports, the whole process finally does exit, but after ~20s delay. Suspecting socket.io for now, but want to do a small reproduce scenario without gulp just to confirm that the pb is indeed on the karma's side. |
This is the reason why |
@lazd correct. So there is an issue in Karma (IMO it is coming from socket.io, but need to confirm) that we need to fix: karma-runner/karma#1035 |
Yay! After tracking down all the crazy timeouts we've got a better integration story for gulp + karma. There is still one issue in Karma waiting to be merged (karma-runner/karma#1054) but the remaining timeout is only 2s to things are usable now even with this timeout. |
Great job @pkozlowski-opensource ! Btw. karma-runner/karma#1054 is merged as well. |
I have a problem here as well. I noticed that the process doesn't exit whenever I use jquery in my files: here's the trace:
Any ideas? |
My bad. Just realized this: You can't have console.log statements in your files, otherwise the above error will happen. |
I don't think this issue is resolved. I have a publish task in my gulpfile and before I do that I want to run the unit test, but 2 seconds after they run, my process die :(. Why does karma need to do a process.exit() if not in singlerun? |
I'm still having the same issue. This is not resolved. |
@johannesjo Ah, sorry. Maybe there was a regression? I remember noting this was fixed when testing myself. |
I mean this issue still stands when using karma directly as provided by the example. |
This is possibly a duplicate of karma-runner/karma#1788 |
Having the same issue with fresh new angular2 app made with angular cli: http://stackoverflow.com/questions/42030568/how-to-manage-to-exit-phantomjs-launcher-after-tests-execution |
Hello. |
Bump |
This issue is old and closed. Please open a new one with recent version and fresh information. |
I am pretty sure that karma will exit when it finishes a single run task.
Assuming this is the case, we should not be calling
process.exit()
when the single run has completed. This would prevent any subsequent tasks from being run.Instead we should make use of Gulp's async task support. You can get a done method from the task parameter list:
Have you tried this? Is there something funny about the karma server that doesn't exit cleanly?
The text was updated successfully, but these errors were encountered: