Skip to content

Commit 7d792d3

Browse files
panvaaduh95
authored andcommitted
test: deflake process timeout report cleanup
The grandchild can briefly outlive the timed-out process while it waits to detect its parent's exit. Give it a working directory outside the test's temporary directory so it does not block cleanup on Windows. Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: #66428 Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent a75dfea commit 7d792d3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎test/fixtures/process-timeout/blocked-worker.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ const script = path.join(__dirname, 'wait-for-parent.js');
1010
const args = [script, String(process.pid), process.argv[2]];
1111
new Worker(`
1212
require('child_process').execFileSync(process.execPath, ${JSON.stringify(args)}, {
13+
// The child can briefly outlive the parent. Do not keep the test's
14+
// temporary directory open, which prevents cleanup on Windows.
15+
cwd: ${JSON.stringify(__dirname)},
1316
stdio: 'ignore',
1417
});
1518
`, { eval: true, name: 'blocked' });

0 commit comments

Comments
 (0)