karma-runner / karma-runner/karma
Browser kill fallback should work during STATE_BEING_FORCE_KILLED
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
The ProcessLauncher (lib/launchers/process.js) has a fallback (_onKillTimeout) for killing a browser process in the case where the default .kill() method doesn't work after a set time period (currently 2000 ms). Unfortunately this fallback only works if the browser is in STATE_BEING_KILLED. Since STATE_BEING_FORCE_KILLED takes the exact same code path, the kill fallback should work for a browser in this state as well. Currently Karma can hang at the end of a test run due to this bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/launchers/process.js and trace the _onKillTimeout fallback and the handling of STATE_BEING_KILLED versus STATE_BEING_FORCE_KILLED. Confirm that both states reach the same fallback path, then verify that a force-killed browser no longer leaves Karma hanging after the kill timeout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100