1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Tidy up exec node clean-up to remove failure-causing timing window

This commit is contained in:
Nick O'Leary 2016-10-11 13:25:19 +01:00
parent 84f7da6e93
commit d119594cbf

View File

@ -74,8 +74,8 @@ describe('exec node', function() {
msg.should.have.property("payload"); msg.should.have.property("payload");
msg.payload.should.be.a.String, msg.payload.should.be.a.String,
msg.payload.should.equal("ECHO"); msg.payload.should.equal("ECHO");
done();
child_process.exec.restore(); child_process.exec.restore();
done();
}); });
n1.receive({payload:"and"}); n1.receive({payload:"and"});
}); });
@ -107,8 +107,8 @@ describe('exec node', function() {
msg.should.have.property("payload"); msg.should.have.property("payload");
msg.payload.should.be.a.String(); msg.payload.should.be.a.String();
msg.payload.should.equal("ECHO AND MORE"); msg.payload.should.equal("ECHO AND MORE");
done();
child_process.exec.restore(); child_process.exec.restore();
done();
}); });
n1.receive({payload:"and"}); n1.receive({payload:"and"});
}); });
@ -137,6 +137,7 @@ describe('exec node', function() {
child_process.exec.restore(); child_process.exec.restore();
done(); done();
} catch(err) { } catch(err) {
child_process.exec.restore();
done(err); done(err);
} }
}); });