fix random fails on tests that use child process
Listen to 'close' event rather than 'exit' event which can be fired before stdio is closed.
This commit is contained in:
parent
d335b5a0f5
commit
339e59afd5
1 changed files with 2 additions and 2 deletions
|
@ -62,7 +62,7 @@ vows.describe('nconf/hierarchy').addBatch({
|
|||
data += d;
|
||||
});
|
||||
|
||||
child.on('exit', function () {
|
||||
child.on('close', function () {
|
||||
fs.readFile(configFile, 'utf8', that.callback.bind(null, null, data));
|
||||
});
|
||||
},
|
||||
|
@ -90,7 +90,7 @@ vows.describe('nconf/hierarchy').addBatch({
|
|||
data += d;
|
||||
});
|
||||
|
||||
child.on('exit', function() {
|
||||
child.on('close', function() {
|
||||
that.callback(null, data);
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue