From 8359c8e19410b2fe27b530b2620f0838afebd164 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 28 Oct 2014 09:48:32 +0800 Subject: [PATCH] spec: Only test net.connect on Mac The Linux travis ci machine is quite unstable on this test. --- spec/node-spec.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/node-spec.coffee b/spec/node-spec.coffee index bf13a06cd6bd..46dcd381aed5 100644 --- a/spec/node-spec.coffee +++ b/spec/node-spec.coffee @@ -96,13 +96,14 @@ describe 'node feature', -> setImmediate done describe 'net.connect', -> - it 'emit error when connect to a socket path without listeners', (done) -> - return done() if process.platform is 'win32' + return unless process.platform is 'darwin' + it 'emit error when connect to a socket path without listeners', (done) -> socketPath = path.join os.tmpdir(), 'atom-shell-test.sock' script = path.join(fixtures, 'module', 'create_socket.js') child = child_process.fork script, [socketPath] - child.on 'exit', -> + child.on 'exit', (code) -> + assert.equal code, 0 client = require('net').connect socketPath client.on 'error', (error) -> assert.equal error.code, 'ECONNREFUSED'