Skip to content

Commit

Permalink
Fix #470 - disable stdin pipe between selenium java process and night…
Browse files Browse the repository at this point in the history
…watch to address linux issues
  • Loading branch information
beatfactor committed Aug 15, 2016
1 parent e8b8b6a commit df10355
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/runner/selenium.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ SeleniumServer.prototype.start = function() {
}

this.setCliArgs();
this.process = child_process.spawn('java', this.cliOpts);
this.process = child_process.spawn('java', this.cliOpts, {
stdio: ['ignore', 'pipe', 'pipe']
});

this.process.host = this.host;
this.process.port = this.port;
this.exitHandlerFn = this.exitHandler.bind(this);
Expand Down
2 changes: 1 addition & 1 deletion test/src/runner/testSelenium.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module.exports = {

testStartServer : function(done) {
this.mockedSpawn.setStrategy(function (command, args, opts) {
assert.deepEqual(opts, {stdio : ['ignore', 'pipe', 'pipe']});
if (command !== 'java') {
return null;
}
Expand All @@ -59,7 +60,6 @@ module.exports = {
}
}
}, function(error, process) {
assert.ok('Callback called');
assert.equal(process.command, 'java');
assert.deepEqual(process.args, ['-jar', './selenium.jar', '-port', 4444, '-host', '127.0.0.1', '-Dwebdriver.test.property=test', '-DpropName=1']);
assert.equal(process.host, '127.0.0.1');
Expand Down

0 comments on commit df10355

Please sign in to comment.