mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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: https://github.com/nodejs/node/pull/66428 Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
1047188452
commit
c19e2cedd2
1 file changed
+3
@@ -10,6 +10,9 @@ const script = path.join(__dirname, 'wait-for-parent.js');
|
||||
const args = [script, String(process.pid), process.argv[2]];
|
||||
new Worker(`
|
||||
require('child_process').execFileSync(process.execPath, ${JSON.stringify(args)}, {
|
||||
// The child can briefly outlive the parent. Do not keep the test's
|
||||
// temporary directory open, which prevents cleanup on Windows.
|
||||
cwd: ${JSON.stringify(__dirname)},
|
||||
stdio: 'ignore',
|
||||
});
|
||||
`, { eval: true, name: 'blocked' });
|
||||
Reference in new issue
Block a user