karma-runner / karma-runner/karma

Ensure all stream buffers are drained before exiting process in single run mode.

Open
#742 3 comments 0 reactions 0 assignees View on GitHub
help wanted type: bug windows
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

After investigating a strange behavior on running karma with TeamCity on Windows, I noticed the following issue.

When running the following command in PowerShell:

```
karma start --single-run | Out-File C:\test.out
```

The writing function is non-blocking/asynchronous & the written/piped data can be buffered, which could lead to some test results being lost.

Karma needs to ensure that all buffers have been drained or that the writing functions have completed (if they are non-blocking) before exiting the process.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with `karma start --single-run | Out-File C:\test.out` in PowerShell on Windows, then trace the single-run process exit and output-writing paths. Done means the process waits for asynchronous or buffered output to finish so piped test results are not lost.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.