Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4481feb

Browse filesBrowse 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 a744e42 commit 4481feb
Copy full SHA for 4481feb

File tree

Expand file treeCollapse file tree

2 files changed

+24
-64
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+24
-64
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-without-async-context-frame.mjs
-64Lines changed: 0 additions & 64 deletions
This file was deleted.
Collapse file
+24Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.