Skip to content

Commit 769b6c8

Browse files
santigimenoMylesBorins
authored andcommitted
test: fix flaky child-process-exec-kill-throws
Kill the child process with `SIGKILL` to make sure the child process does not remain alive. Fixes: #20139 PR-URL: #20213 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Weijia Wang <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent e17280e commit 769b6c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/parallel/test-child-process-exec-kill-throws.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ if (process.argv[2] === 'child') {
1919
};
2020

2121
const cmd = `"${process.execPath}" "${__filename}" child`;
22-
const options = { maxBuffer: 0 };
22+
const options = { maxBuffer: 0, killSignal: 'SIGKILL' };
23+
2324
const child = cp.exec(cmd, options, common.mustCall((err, stdout, stderr) => {
2425
// Verify that if ChildProcess#kill() throws, the error is reported.
2526
assert.strictEqual(err.message, 'mock error', err);

0 commit comments

Comments
 (0)