Skip to content

Commit 1b79174

Browse files
Trotttargos
authored andcommittedApr 22, 2020
test: replace Map with Array in cluster-net-listen tests
PR-URL: #32381 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 7a346f6 commit 1b79174

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎test/sequential/test-cluster-net-listen-ipv6only-none.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const host = '::';
1616
const WORKER_ACCOUNT = 3;
1717

1818
if (cluster.isMaster) {
19-
const workers = new Map();
19+
const workers = [];
2020

2121
const countdown = new Countdown(WORKER_ACCOUNT, () => {
2222
// Make sure the `ipv6Only` option works. This is the part of the test that
@@ -46,7 +46,7 @@ if (cluster.isMaster) {
4646
countdown.dec();
4747
}));
4848

49-
workers.set(i, worker);
49+
workers[i] = worker;
5050
}
5151
} else {
5252
net.createServer().listen({

‎test/sequential/test-cluster-net-listen-ipv6only-rr.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const host = '::';
1616
const WORKER_ACCOUNT = 3;
1717

1818
if (cluster.isMaster) {
19-
const workers = new Map();
19+
const workers = [];
2020
let address;
2121

2222
const countdown = new Countdown(WORKER_ACCOUNT, () => {
@@ -45,7 +45,7 @@ if (cluster.isMaster) {
4545
countdown.dec();
4646
}));
4747

48-
workers.set(i, worker);
48+
workers[i] = worker;
4949
}
5050
} else {
5151
// As the cluster member has the potential to grab any port

0 commit comments

Comments
 (0)
Please sign in to comment.