Skip to content

Commit

Permalink
reduce test timeouts on appveyor since signals have no impact
Browse files Browse the repository at this point in the history
  • Loading branch information
silkentrance committed Mar 13, 2019
1 parent 69b1115 commit 2e5fed9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions lib/tmp.js
Expand Up @@ -605,12 +605,12 @@ function _safely_install_listener() {
rl.on('SIGINT', function () {
process.emit('SIGINT');
});
} else {
process.on('SIGINT', function () {
process.exit(0);
});
}

process.on('SIGINT', function () {
process.exit(0);
});

process.addListener(EVENT, function _tmp$safe_listener(data) {
/* istanbul ignore else */
if (existingListeners.length) {
Expand Down
2 changes: 0 additions & 2 deletions test/child-process.js
Expand Up @@ -48,8 +48,6 @@ function _doSpawn(commandArgs, cb) {
child = spawn(node_path, commandArgs);
child.stdin.end();

// TODO we no longer support node 0.6
// Cannot use 'close' event because not on node-0.6.
function _close() {
var
stderr = _bufferConcat(stderrBufs).toString(),
Expand Down
4 changes: 3 additions & 1 deletion test/outband/issue121.js
Expand Up @@ -11,6 +11,7 @@ tmp.setGracefulCleanup();

// https://github.com/raszi/node-tmp/issues/121
module.exports = function (signal) {

try {
fixture.apply(this, [tmp.dirSync({ unsafeCleanup: true }), tmp]);
}
Expand All @@ -20,7 +21,8 @@ module.exports = function (signal) {
}

// make sure that the process keeps running
setTimeout(function () {}, 1000000);
setTimeout(function () {}, 10000);

// we will now end this process, triggering tmp's exit handler
this.kill(signal);
};

0 comments on commit 2e5fed9

Please sign in to comment.