mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: replace Map with Array in cluster-net-listen tests
PR-URL: https://github.com/nodejs/node/pull/32381 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
@@ -16,7 +16,7 @@ const host = '::';
|
||||
const WORKER_ACCOUNT = 3;
|
||||
|
||||
if (cluster.isMaster) {
|
||||
const workers = new Map();
|
||||
const workers = [];
|
||||
|
||||
const countdown = new Countdown(WORKER_ACCOUNT, () => {
|
||||
// Make sure the `ipv6Only` option works. This is the part of the test that
|
||||
@@ -46,7 +46,7 @@ if (cluster.isMaster) {
|
||||
countdown.dec();
|
||||
}));
|
||||
|
||||
workers.set(i, worker);
|
||||
workers[i] = worker;
|
||||
}
|
||||
} else {
|
||||
net.createServer().listen({
|
||||
|
||||
@@ -16,7 +16,7 @@ const host = '::';
|
||||
const WORKER_ACCOUNT = 3;
|
||||
|
||||
if (cluster.isMaster) {
|
||||
const workers = new Map();
|
||||
const workers = [];
|
||||
let address;
|
||||
|
||||
const countdown = new Countdown(WORKER_ACCOUNT, () => {
|
||||
@@ -45,7 +45,7 @@ if (cluster.isMaster) {
|
||||
countdown.dec();
|
||||
}));
|
||||
|
||||
workers.set(i, worker);
|
||||
workers[i] = worker;
|
||||
}
|
||||
} else {
|
||||
// As the cluster member has the potential to grab any port
|
||||
|
||||
Reference in New Issue
Block a user