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 6cedeb1

Browse filesBrowse files
Trotttargos
authored andcommitted
test: change common.PORT to arbitrary port
Change common.PORT to arbitrary port in test-child-process-fork-getconnections to prepare for moving that test from sequential to parallel. PR-URL: #30749 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 7d5ab8b commit 6cedeb1
Copy full SHA for 6cedeb1

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/sequential/test-child-process-fork-getconnections.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-child-process-fork-getconnections.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23-
const common = require('../common');
23+
require('../common');
2424
const assert = require('assert');
2525
const fork = require('child_process').fork;
2626
const net = require('net');
@@ -79,7 +79,7 @@ if (process.argv[2] === 'child') {
7979
server.on('listening', function() {
8080
let j = count;
8181
while (j--) {
82-
const client = net.connect(common.PORT, '127.0.0.1');
82+
const client = net.connect(server.address().port, '127.0.0.1');
8383
client.on('close', function() {
8484
disconnected += 1;
8585
});
@@ -110,7 +110,7 @@ if (process.argv[2] === 'child') {
110110
closeEmitted = true;
111111
});
112112

113-
server.listen(common.PORT, '127.0.0.1');
113+
server.listen(0, '127.0.0.1');
114114

115115
process.on('exit', function() {
116116
assert.strictEqual(sent, count);

0 commit comments

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