summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2016-05-29 14:02:22 -0400
committercjihrig <cjihrig@gmail.com>2016-05-31 09:21:00 -0400
commitc4f80c1f3466eb56f33136ee6e2332335db0ec67 (patch)
tree276ad3fdb813f737d7ad42c07a2a2b324e5c82ab /test
parent2369f89a035c00af1a17d89e53308612eb110af0 (diff)
downloadandroid-node-v8-c4f80c1f3466eb56f33136ee6e2332335db0ec67.tar.gz
android-node-v8-c4f80c1f3466eb56f33136ee6e2332335db0ec67.tar.bz2
android-node-v8-c4f80c1f3466eb56f33136ee6e2332335db0ec67.zip
cluster: rewrite debug ports consistently
When debug flags are passed to clustered applications, the debug port is rewritten for each worker process to avoid collisions. Prior to this commit, each debug flag would get a unique value. This commit reworks the logic to assign the same port value to all debug flags for a single worker. PR-URL: https://github.com/nodejs/node/pull/7050 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-cluster-debug-port.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/parallel/test-cluster-debug-port.js b/test/parallel/test-cluster-debug-port.js
index e8f3f58b95..70203124ef 100644
--- a/test/parallel/test-cluster-debug-port.js
+++ b/test/parallel/test-cluster-debug-port.js
@@ -22,6 +22,11 @@ if (cluster.isMaster) {
portSet: process.debugPort + 1
}).on('exit', checkExitCode);
+ cluster.setupMaster({
+ execArgv: [`--debug-port=${process.debugPort}`,
+ `--debug=${process.debugPort}`]
+ });
+
console.log('forked worker should have --debug-port, with offset = 2');
cluster.fork({
portSet: process.debugPort + 2