Skip to content

Commit 2e5fed9

Browse files
committed
reduce test timeouts on appveyor since signals have no impact
1 parent 69b1115 commit 2e5fed9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

lib/tmp.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,12 +605,12 @@ function _safely_install_listener() {
605605
rl.on('SIGINT', function () {
606606
process.emit('SIGINT');
607607
});
608+
} else {
609+
process.on('SIGINT', function () {
610+
process.exit(0);
611+
});
608612
}
609613

610-
process.on('SIGINT', function () {
611-
process.exit(0);
612-
});
613-
614614
process.addListener(EVENT, function _tmp$safe_listener(data) {
615615
/* istanbul ignore else */
616616
if (existingListeners.length) {

test/child-process.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ function _doSpawn(commandArgs, cb) {
4848
child = spawn(node_path, commandArgs);
4949
child.stdin.end();
5050

51-
// TODO we no longer support node 0.6
52-
// Cannot use 'close' event because not on node-0.6.
5351
function _close() {
5452
var
5553
stderr = _bufferConcat(stderrBufs).toString(),

test/outband/issue121.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ tmp.setGracefulCleanup();
1111

1212
// https://github.com/raszi/node-tmp/issues/121
1313
module.exports = function (signal) {
14+
1415
try {
1516
fixture.apply(this, [tmp.dirSync({ unsafeCleanup: true }), tmp]);
1617
}
@@ -20,7 +21,8 @@ module.exports = function (signal) {
2021
}
2122

2223
// make sure that the process keeps running
23-
setTimeout(function () {}, 1000000);
24+
setTimeout(function () {}, 10000);
2425

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

0 commit comments

Comments
 (0)