From 793c7936c394aba54875f84b135684e38a30ff94 Mon Sep 17 00:00:00 2001 From: Colin Ihrig Date: Sun, 2 Feb 2025 22:12:19 -0500 Subject: [PATCH] test: fix race condition in test-child-process-bad-stdio 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: https://github.com/nodejs/node/pull/56845 Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Jake Yuesong Li --- test/parallel/test-child-process-bad-stdio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-child-process-bad-stdio.js b/test/parallel/test-child-process-bad-stdio.js index b612fc832281a6..3b17e2ce0d5a72 100644 --- a/test/parallel/test-child-process-bad-stdio.js +++ b/test/parallel/test-child-process-bad-stdio.js @@ -3,7 +3,7 @@ const common = require('../common'); if (process.argv[2] === 'child') { - setTimeout(() => {}, common.platformTimeout(100)); + setTimeout(() => {}, common.platformTimeout(1000)); return; }