Karma: <any_browser_here> process gets killed forcibly after 2000 ms

Created on 10 Nov 2016  路  3Comments  路  Source: karma-runner/karma

Expected behaviour

The behaviour as to when to kill the browser should be configurable. There is a hardcoded value in karma/lib/launchers/process.js which is var killTimeout = 2000

Actual behaviour

Since the value is not configurable the browser gets killed after 2s. If there's something running within the browser (e.g. when using karma-coverage and istanbul works on a large number of files), it gets killed.

Environment Details

  • Karma version (output of karma --version): 1.3.0
  • Relevant part of your karma.config.js file: not available

Steps to reproduce the behaviour

  1. Configure karma-coverage to run on a big code base
  2. Run karma
  3. Observe how the browser gets killed after 2s before it has a chance to finish processing the coverage data
help wanted

Most helpful comment

@maksimr Is it okay if I try to submit a pull request for this issue?

(Thinking aloud) --> I need to setup a provision for a new property in karma config to read the SIGKILL timeout. Let the default value be the current default value but when the user sets this value to some number in milliseconds, we need to honor that by waiting that many milliseconds before a forced SIGKILL.

Will this work?

All 3 comments

@maksimr Is it okay if I try to submit a pull request for this issue?

(Thinking aloud) --> I need to setup a provision for a new property in karma config to read the SIGKILL timeout. Let the default value be the current default value but when the user sets this value to some number in milliseconds, we need to honor that by waiting that many milliseconds before a forced SIGKILL.

Will this work?

@vivganes sure

I need to setup a provision for a new ... many milliseconds before a forced SIGKILL.

sounds good!

Thanks!

@vivganes thanks for taking a peek at it.

Was this page helpful?
0 / 5 - 0 ratings