summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-05-25 23:06:07 -0700
committerRich Trott <rtrott@gmail.com>2016-05-29 13:27:42 -0700
commitbddfe63049c4c0664ef6c7c4458bd373f1e02e4a (patch)
tree5686dc8caee2e110ea37632353f2c242e8ec920c /test
parentd23b7d2656dc25f6a33bcd436e15e9fd84aabc27 (diff)
downloadandroid-node-v8-bddfe63049c4c0664ef6c7c4458bd373f1e02e4a.tar.gz
android-node-v8-bddfe63049c4c0664ef6c7c4458bd373f1e02e4a.tar.bz2
android-node-v8-bddfe63049c4c0664ef6c7c4458bd373f1e02e4a.zip
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: https://github.com/nodejs/node/pull/6990 Refs: https://github.com/nodejs/node/issues/6989 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/clustered-server/app.js2
-rw-r--r--test/parallel/test-debug-port-cluster.js2
-rw-r--r--test/parallel/test-debug-signal-cluster.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/test/fixtures/clustered-server/app.js b/test/fixtures/clustered-server/app.js
index f89d70ee8f..cae204c25b 100644
--- a/test/fixtures/clustered-server/app.js
+++ b/test/fixtures/clustered-server/app.js
@@ -31,5 +31,5 @@ if (cluster.isMaster) {
}
} else {
var server = http.createServer(handleRequest);
- server.listen(common.PORT+1000);
+ server.listen(common.PORT);
}
diff --git a/test/parallel/test-debug-port-cluster.js b/test/parallel/test-debug-port-cluster.js
index ba87a1ea3b..cc564b3ac1 100644
--- a/test/parallel/test-debug-port-cluster.js
+++ b/test/parallel/test-debug-port-cluster.js
@@ -3,7 +3,7 @@ const common = require('../common');
const assert = require('assert');
const spawn = require('child_process').spawn;
-const PORT_MIN = common.PORT;
+const PORT_MIN = common.PORT + 1; // The fixture uses common.PORT.
const PORT_MAX = PORT_MIN + 2;
const args = [
diff --git a/test/parallel/test-debug-signal-cluster.js b/test/parallel/test-debug-signal-cluster.js
index 7a950458b8..e51cd9a50a 100644
--- a/test/parallel/test-debug-signal-cluster.js
+++ b/test/parallel/test-debug-signal-cluster.js
@@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
var spawn = require('child_process').spawn;
-var port = common.PORT + 42;
+var port = common.PORT + 1; // The fixture uses common.PORT.
var args = ['--debug-port=' + port,
common.fixturesDir + '/clustered-server/app.js'];
var options = { stdio: ['inherit', 'inherit', 'pipe', 'ipc'] };