Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bdcc11f

Browse filesBrowse files
TrottMylesBorins
authored andcommitted
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 85bdb42 commit bdcc11f
Copy full SHA for bdcc11f

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/sequential/test-cluster-net-listen-ipv6only-none.js
+2-2Lines changed: 2 additions & 2 deletions
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({
Collapse file

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

Copy file name to clipboardExpand all lines: test/sequential/test-cluster-net-listen-ipv6only-rr.js
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.