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 8346596

Browse filesBrowse files
Trotttargos
authored andcommitted
test: permit test-graph.signal to work without test runner
test/async-hooks/test-graph.signal.js passes with the test.py test runner but fails if run directly with the `node` executable. Modify the test so it passes in both cases. PR-URL: #28305 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 53297e6 commit 8346596
Copy full SHA for 8346596

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Open diff view settings
Collapse file

‎test/async-hooks/test-graph.signal.js‎

Copy file name to clipboardExpand all lines: test/async-hooks/test-graph.signal.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ function onexit() {
5353
{ type: 'PIPEWRAP', id: 'pipe:4', triggerAsyncId: 'signal:1' },
5454
{ type: 'PIPEWRAP', id: 'pipe:5', triggerAsyncId: 'signal:1' },
5555
{ type: 'PIPEWRAP', id: 'pipe:6', triggerAsyncId: 'signal:1' },
56-
{ type: 'SIGNALWRAP', id: 'signal:2', triggerAsyncId: 'signal:1' },
56+
{ type: 'SIGNALWRAP', id: 'signal:2',
57+
// TEST_THREAD_ID is set by tools/test.py. Adjust test results depending
58+
// on whether the test was invoked via test.py or from the shell
59+
// directly.
60+
triggerAsyncId: process.env.TEST_THREAD_ID ? 'signal:1' : 'pipe:2' },
5761
{ type: 'PROCESSWRAP', id: 'process:3', triggerAsyncId: 'signal:1' },
5862
{ type: 'PIPEWRAP', id: 'pipe:7', triggerAsyncId: 'signal:1' },
5963
{ type: 'PIPEWRAP', id: 'pipe:8', triggerAsyncId: 'signal:1' },

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.