Skip to content

Commit

Permalink
test: use random port in NodeInstance.startViaSignal()
Browse files Browse the repository at this point in the history
Which makes it possible to run the tests that use this in parallel.

PR-URL: #47412
Refs: #47146
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
joyeecheung authored and danielleadams committed Jul 6, 2023
1 parent 994a750 commit 4af86be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/common/inspector-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ class NodeInstance extends EventEmitter {

static async startViaSignal(scriptContents) {
const instance = new NodeInstance(
['--expose-internals'],
['--expose-internals', '--inspect-port=0'],
`${scriptContents}\nprocess._rawDebug('started');`, undefined);
const msg = 'Timed out waiting for process to start';
while (await fires(instance.nextStderrString(), msg, TIMEOUT) !== 'started');
Expand Down

0 comments on commit 4af86be

Please sign in to comment.