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: https://github.com/nodejs/node/pull/28305 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
5705d7bf60
commit
e4136c1ece
@ -53,7 +53,11 @@ function onexit() {
|
||||
{ type: 'PIPEWRAP', id: 'pipe:4', triggerAsyncId: 'signal:1' },
|
||||
{ type: 'PIPEWRAP', id: 'pipe:5', triggerAsyncId: 'signal:1' },
|
||||
{ type: 'PIPEWRAP', id: 'pipe:6', triggerAsyncId: 'signal:1' },
|
||||
{ type: 'SIGNALWRAP', id: 'signal:2', triggerAsyncId: 'signal:1' },
|
||||
{ type: 'SIGNALWRAP', id: 'signal:2',
|
||||
// TEST_THREAD_ID is set by tools/test.py. Adjust test results depending
|
||||
// on whether the test was invoked via test.py or from the shell
|
||||
// directly.
|
||||
triggerAsyncId: process.env.TEST_THREAD_ID ? 'signal:1' : 'pipe:2' },
|
||||
{ type: 'PROCESSWRAP', id: 'process:3', triggerAsyncId: 'signal:1' },
|
||||
{ type: 'PIPEWRAP', id: 'pipe:7', triggerAsyncId: 'signal:1' },
|
||||
{ type: 'PIPEWRAP', id: 'pipe:8', triggerAsyncId: 'signal:1' },
|
||||
|
Loading…
x
Reference in New Issue
Block a user