From d119594cbfc765aa13673cf4f9b2bafb590b6f2a Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 11 Oct 2016 13:25:19 +0100 Subject: [PATCH] Tidy up exec node clean-up to remove failure-causing timing window --- test/nodes/core/core/75-exec_spec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/nodes/core/core/75-exec_spec.js b/test/nodes/core/core/75-exec_spec.js index 9d44d96d7..e69202bc4 100644 --- a/test/nodes/core/core/75-exec_spec.js +++ b/test/nodes/core/core/75-exec_spec.js @@ -74,8 +74,8 @@ describe('exec node', function() { msg.should.have.property("payload"); msg.payload.should.be.a.String, msg.payload.should.equal("ECHO"); - done(); child_process.exec.restore(); + done(); }); n1.receive({payload:"and"}); }); @@ -107,8 +107,8 @@ describe('exec node', function() { msg.should.have.property("payload"); msg.payload.should.be.a.String(); msg.payload.should.equal("ECHO AND MORE"); - done(); child_process.exec.restore(); + done(); }); n1.receive({payload:"and"}); }); @@ -137,6 +137,7 @@ describe('exec node', function() { child_process.exec.restore(); done(); } catch(err) { + child_process.exec.restore(); done(err); } });