Skip to content

Commit 405a9c4

Browse files
joyeecheungaduh95
authored andcommitted
test: parallelize test-without-async-context-frame correctly
It previously re-einvented the pattern matching that's already supported by test.py, and was running the tests one by one, which can lead to time out on slower machines. This move it to sequential and use wildcard support in test.py to correctly parallelize the tests. PR-URL: #60273 Fixes: #60268 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
1 parent ffeebeb commit 405a9c4

File tree

2 files changed

+24
-64
lines changed

2 files changed

+24
-64
lines changed

test/parallel/test-without-async-context-frame.mjs

Lines changed: 0 additions & 64 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { isWindows } from '../common/index.mjs';
2+
import { spawn } from 'node:child_process';
3+
import { once } from 'node:events';
4+
import { fileURLToPath } from 'node:url';
5+
import { strictEqual } from 'node:assert';
6+
7+
const python = process.env.PYTHON || (isWindows ? 'python' : 'python3');
8+
9+
const testRunner = fileURLToPath(
10+
new URL('../../tools/test.py', import.meta.url)
11+
);
12+
13+
const proc = spawn(python, [
14+
testRunner,
15+
`--mode=${process.features.debug ? 'debug' : 'release'}`,
16+
`--shell=${process.execPath}`,
17+
'--node-args=--no-async-context-frame',
18+
'*/test-async-local-storage-*',
19+
], {
20+
stdio: ['inherit', 'inherit', 'inherit'],
21+
});
22+
23+
const [code] = await once(proc, 'exit');
24+
strictEqual(code, 0);

0 commit comments

Comments
 (0)