Skip to content

Commit cde3014

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
test: remove modifcation to common.PORT
A possibly-buggy fixture server uses `common.PORT+1000` for its port rather than `common.PORT`. That could result in it clashing with other ports if tests are run in parallel. The test runner increments `common.PORT` by 100 for each running instance for tests. Change to use common.PORT and have the tests that use the fixture start with common.PORT+1 for anything they need. PR-URL: #6990 Refs: #6989 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 1c65f1e commit cde3014

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/fixtures/clustered-server/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ if (cluster.isMaster) {
3131
}
3232
} else {
3333
var server = http.createServer(handleRequest);
34-
server.listen(common.PORT+1000);
34+
server.listen(common.PORT);
3535
}

test/parallel/test-debug-port-cluster.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const common = require('../common');
33
const assert = require('assert');
44
const spawn = require('child_process').spawn;
55

6-
const PORT_MIN = common.PORT;
6+
const PORT_MIN = common.PORT + 1; // The fixture uses common.PORT.
77
const PORT_MAX = PORT_MIN + 2;
88

99
const args = [

test/parallel/test-debug-signal-cluster.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var common = require('../common');
33
var assert = require('assert');
44
var spawn = require('child_process').spawn;
55

6-
var port = common.PORT + 42;
6+
var port = common.PORT + 1; // The fixture uses common.PORT.
77
var args = ['--debug-port=' + port,
88
common.fixturesDir + '/clustered-server/app.js'];
99
var options = { stdio: ['inherit', 'inherit', 'pipe', 'ipc'] };

0 commit comments

Comments
 (0)