Skip to content

Commit 7e8f7c7

Browse files
committed
test: fix flakyness with yes.exe
Fixes: #12817 Ref: #12658
1 parent 4677766 commit 7e8f7c7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

benchmark/child_process/child-process-read.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ function main(conf) {
2929
});
3030

3131
setTimeout(function() {
32-
child.kill();
32+
if (process.platform === 'win32') {
33+
// Sometimes there's a yes.exe process left hanging around on Windows...
34+
child_process.execSync(`taskkill /f /t /pid ${child.pid}`);
35+
} else {
36+
child.kill();
37+
}
3338
const gbits = (bytes * 8) / (1024 * 1024 * 1024);
3439
bench.end(gbits);
3540
}, dur * 1000);

0 commit comments

Comments
 (0)