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 RafaelGSS committed Apr 13, 2023
1 parent 7d2d40e commit 1a78632
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 1a78632

Please sign in to comment.