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 384fa17

Browse filesBrowse files
Sebastian PlesciucMylesBorins
authored andcommitted
test: use dynamic port in 3 test-cluster-worker tests
Remove common.PORT from test-cluster-worker-disconnect, test-cluster-worker-exit and test-cluster-worker-kill to eliminate the possibility that a dynamic port used in another test will collide with common.PORT. PR-URL: #12443 Ref: #12376 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent bc40169 commit 384fa17
Copy full SHA for 384fa17

File tree

Expand file treeCollapse file tree

3 files changed

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

3 files changed

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

‎test/parallel/test-cluster-worker-disconnect.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cluster-worker-disconnect.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (cluster.isWorker) {
77
const http = require('http');
88
http.Server(() => {
99

10-
}).listen(common.PORT, '127.0.0.1');
10+
}).listen(0, '127.0.0.1');
1111
const worker = cluster.worker;
1212
assert.strictEqual(worker.exitedAfterDisconnect, worker.suicide);
1313

Collapse file

‎test/parallel/test-cluster-worker-exit.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cluster-worker-exit.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (cluster.isWorker) {
1919
server.once('listening', common.mustCall(() => {
2020
process.exit(EXIT_CODE);
2121
}));
22-
server.listen(common.PORT, '127.0.0.1');
22+
server.listen(0, '127.0.0.1');
2323

2424
} else if (cluster.isMaster) {
2525

Collapse file

‎test/parallel/test-cluster-worker-kill.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cluster-worker-kill.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if (cluster.isWorker) {
1515
const server = http.Server(() => { });
1616

1717
server.once('listening', common.mustCall(() => { }));
18-
server.listen(common.PORT, '127.0.0.1');
18+
server.listen(0, '127.0.0.1');
1919

2020
} else if (cluster.isMaster) {
2121

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.