Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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>
  • Loading branch information
Trott committed Dec 3, 2019
commit 4f5685d233d45be2c25f89e8cb2e3d0b30989b3e
6 changes: 3 additions & 3 deletions test/sequential/test-child-process-fork-getconnections.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
require('../common');
const assert = require('assert');
const fork = require('child_process').fork;
const net = require('net');
Expand Down Expand Up @@ -79,7 +79,7 @@ if (process.argv[2] === 'child') {
server.on('listening', function() {
let j = count;
while (j--) {
const client = net.connect(common.PORT, '127.0.0.1');
const client = net.connect(server.address().port, '127.0.0.1');
client.on('close', function() {
disconnected += 1;
});
Expand Down Expand Up @@ -110,7 +110,7 @@ if (process.argv[2] === 'child') {
closeEmitted = true;
});

server.listen(common.PORT, '127.0.0.1');
server.listen(0, '127.0.0.1');

process.on('exit', function() {
assert.strictEqual(sent, count);
Expand Down