karma-runner / karma-runner/karma

Batch job does not terminate with Karma 1.4.0

Open
#2,552 2 comments 0 reactions 0 assignees View on GitHub
help wanted needs: investigation type: bug
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### Expected behaviour

The batch job `gulp test_browser` should terminate when the Gulp task `test_browser` finishes.

### Actual behaviour

The batch job `gulp test_browser` does not terminate when the Gulp task `test_browser` finishes. I need to kill the job manually (`Ctrl + C`).

### Environment Details

- Operating system: Windows 10 Home
- Karma version (output of `karma --version`): 1.4.0

**gulpfile.js**

```javascript
gulp.task('test_browser', function(done) {
gutil.log(gutil.colors.yellow('Running tests in Google Chrome:'));

var server = new Server({
configFile: __dirname + '/karma.conf.js',
files: [
'test/js/helpers/**/*.js',
paths.dist_window + '/**/*.js',
'test/js/specs/**/*Spec.js'
]
}, done);

server.start();
});
```

### Steps to reproduce the behaviour

1. I upgraded from `"karma": "1.3.0"` to `"karma": "1.4.0"` (in `package.json`)
2. When I run `gulp test_browser`, then this job does not terminate with Karma 1.4.0 (but it does with Karma 1.3.0)
3. The project I used for testing is: https://github.com/wireapp/bazinga64

**Terminal output with Karma v1.3.0 server**

![karma-1-3-0](https://cloud.githubusercontent.com/assets/469989/22375487/8a9d6c8a-e4aa-11e6-9c99-edfe54148066.PNG)

**Terminal output with Karma v1.4.0 server**

![karma-1-4-0](https://cloud.githubusercontent.com/assets/469989/22375544/c95473ec-e4aa-11e6-8ad0-82cdcb5e3f9f.PNG)

Please let me know if you need more details. Happy to help!

Contributor guide

Open the contributing guide

Research direction

Start with gulpfile.js and package.json: compare the test_browser invocation and Karma 1.3.0 versus 1.4.0, then reproduce on Windows 10 with gulp test_browser. Use karma.conf.js and the linked bazinga64 project for configuration context. Done means the command exits on its own after the test_browser task finishes under Karma 1.4.0.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.