scottohara / loot

An implementation of some of the core MS Money features in Ruby on Rails
MIT License
4 stars 3 forks source link

30s delay in karma finish due to unclean websocket close #111

Closed scottohara closed 6 years ago

scottohara commented 8 years ago

Previously in our gulpfile, the startKarma function used a default callback for Karma.Server (require('karma').Server(config, callback)), which was effectively a call to process.exit(exitCode) as soon as the Karma run finished.

Now that we have a test:ci task that runs both test:src and test:build; we don't want to kill the process as soon as one test suite finishes...we want to wait until both have finished; so now we pass a different callback, to prevent process.exit() from being called.

However, there seems to be a ~30s delay between the Karma run finishing, and the gulp process ending. Anecdotally, this only seems to be when coverage is run, i.e.

Suggestion is that this might be due to unclean socket close: https://github.com/karma-runner/karma/issues/1788

toddpi314 commented 7 years ago

Seeing this on node@7.1.0, karma@1.3.0, karma-phantomjs-launcher@1.0.2. This sucker is burning of hours on Jenkins... Pretty positive it is a karma issue.

scottohara commented 6 years ago

This becomes redundant with the move to webpack