Skip to content

Commit 907b8ff

Browse files
committed
cluster: const numWorkers added in test-inspect-support-for-node_options
const numWorkers added to specify number of workers spawned in test-inspect-support-for-node_options. PR nodejs#19165 Fixes : nodejs#19026
1 parent d2cf4a4 commit 907b8ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/parallel/test-inspect-support-for-node_options.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ checkForInspectSupport('--inspect');
1010
function checkForInspectSupport(flag) {
1111

1212
const nodeOptions = JSON.stringify(flag);
13+
const numWorkers = 2;
1314
process.env.NODE_OPTIONS = flag;
1415

1516
if (cluster.isMaster) {
16-
for (let i = 0; i < 2; i++) {
17+
for (let i = 0; i < numWorkers; i++) {
1718
cluster.fork();
1819
}
1920

@@ -24,6 +25,6 @@ function checkForInspectSupport(flag) {
2425
cluster.on('exit', common.mustCall((worker, code, signal) => {
2526
const errMsg = `For NODE_OPTIONS ${nodeOptions}, failed to start cluster`;
2627
assert.strictEqual(worker.exitedAfterDisconnect, true, errMsg);
27-
}, 2));
28+
}, numWorkers));
2829
}
2930
}

0 commit comments

Comments
 (0)