Skip to content

Commit df10355

Browse files
committed
Fix #470 - disable stdin pipe between selenium java process and nightwatch to address linux issues
1 parent e8b8b6a commit df10355

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/runner/selenium.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ SeleniumServer.prototype.start = function() {
5050
}
5151

5252
this.setCliArgs();
53-
this.process = child_process.spawn('java', this.cliOpts);
53+
this.process = child_process.spawn('java', this.cliOpts, {
54+
stdio: ['ignore', 'pipe', 'pipe']
55+
});
56+
5457
this.process.host = this.host;
5558
this.process.port = this.port;
5659
this.exitHandlerFn = this.exitHandler.bind(this);

test/src/runner/testSelenium.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module.exports = {
3838

3939
testStartServer : function(done) {
4040
this.mockedSpawn.setStrategy(function (command, args, opts) {
41+
assert.deepEqual(opts, {stdio : ['ignore', 'pipe', 'pipe']});
4142
if (command !== 'java') {
4243
return null;
4344
}
@@ -59,7 +60,6 @@ module.exports = {
5960
}
6061
}
6162
}, function(error, process) {
62-
assert.ok('Callback called');
6363
assert.equal(process.command, 'java');
6464
assert.deepEqual(process.args, ['-jar', './selenium.jar', '-port', 4444, '-host', '127.0.0.1', '-Dwebdriver.test.property=test', '-DpropName=1']);
6565
assert.equal(process.host, '127.0.0.1');

0 commit comments

Comments
 (0)