Skip to content

Commit

Permalink
test: replace Map with Array in cluster-net-listen tests
Browse files Browse the repository at this point in the history
PR-URL: #32381
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Mar 24, 2020
1 parent 85bdb42 commit bdcc11f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/sequential/test-cluster-net-listen-ipv6only-none.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -46,7 +46,7 @@ if (cluster.isMaster) {
countdown.dec();
}));

workers.set(i, worker);
workers[i] = worker;
}
} else {
net.createServer().listen({
Expand Down
4 changes: 2 additions & 2 deletions test/sequential/test-cluster-net-listen-ipv6only-rr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, () => {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bdcc11f

Please sign in to comment.