Skip to content

Commit

Permalink
test: reland changes from 11c1bae
Browse files Browse the repository at this point in the history
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: #501
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
  • Loading branch information
bnoordhuis committed Jan 19, 2015
1 parent 992a1e7 commit 6b91c78
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/parallel/test-debug-signal-cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 6b91c78

Please sign in to comment.