karma-runner / karma-runner/karma

Browser kill fallback should work during STATE_BEING_FORCE_KILLED

Open
#1,615 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.