Skip to content

Commit

Permalink
Add timeout to fix race condition in tests
Browse files Browse the repository at this point in the history
Add a timeout to the `process.kill(process.pid, ...)` test cases
so that the process is always around long enough to receive the signal.
  • Loading branch information
addaleax authored and isaacs committed Oct 13, 2017
1 parent b4fa00b commit f8d9b5a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if (process.argv[2] === 'child') {
case 'SIGHUP':
case 'SIGKILL':
process.kill(process.pid, process.argv[3])
setTimeout(function () {}, 100)
break

case '0':
Expand Down

0 comments on commit f8d9b5a

Please sign in to comment.