From 6b91c78e201948937a4524027a6778aa7f82fb0a Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 19 Jan 2015 01:14:02 +0100 Subject: [PATCH] test: reland changes from 11c1bae Reland the changes from commit 11c1bae ("lib: make --debug-port work with cluster") that were temporarily backed out to cherry-pick commits from joyent/node. PR-URL: https://github.com/iojs/io.js/pull/501 Reviewed-By: Bert Belder Reviewed-By: Rod Vagg --- test/parallel/test-debug-signal-cluster.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-debug-signal-cluster.js b/test/parallel/test-debug-signal-cluster.js index 5190bd1cae6..026e2932622 100644 --- a/test/parallel/test-debug-signal-cluster.js +++ b/test/parallel/test-debug-signal-cluster.js @@ -2,10 +2,12 @@ var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; -var args = [ common.fixturesDir + '/clustered-server/app.js' ]; -var child = spawn(process.execPath, args, { - stdio: [ 'pipe', 'pipe', 'pipe', 'ipc' ] -}); +var port = common.PORT + 42; +var args = ['--debug-port=' + port, + common.fixturesDir + '/clustered-server/app.js']; +var options = { stdio: ['inherit', 'inherit', 'pipe', 'ipc'] }; +var child = spawn(process.execPath, args, options); + var outputLines = []; var outputTimerId; var waitingForDebuggers = false; @@ -61,11 +63,11 @@ process.on('exit', function onExit() { var expectedLines = [ 'Starting debugger agent.', - 'Debugger listening on port ' + 5858, + 'Debugger listening on port ' + (port + 0), 'Starting debugger agent.', - 'Debugger listening on port ' + 5859, + 'Debugger listening on port ' + (port + 1), 'Starting debugger agent.', - 'Debugger listening on port ' + 5860, + 'Debugger listening on port ' + (port + 2), ]; function assertOutputLines() {