Skip to content

Commit

Permalink
test: fix race condition in test-child-process-bad-stdio
Browse files Browse the repository at this point in the history
test-child-process-bad-stdio.js contains a race condition between
a timeout in the test process and a timeout in the spawned child
process. This commit addresses the race condition by having the
child process wait indefinitely to be killed.

PR-URL: #56845
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
  • Loading branch information
cjihrig authored Feb 3, 2025
1 parent cadc4ed commit 793c793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-child-process-bad-stdio.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const common = require('../common');

if (process.argv[2] === 'child') {
setTimeout(() => {}, common.platformTimeout(100));
setTimeout(() => {}, common.platformTimeout(1000));
return;
}

Expand Down

0 comments on commit 793c793

Please sign in to comment.