Skip to content

Commit

Permalink
CR
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLow committed Sep 12, 2022
1 parent cf98295 commit 60a33fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/sequential/test-watch-mode.mjs
Expand Up @@ -15,6 +15,7 @@ if (common.isIBMi)
common.skip('IBMi does not support `fs.watch()`');

function restart(file) {
// To avoid flakiness, we save the file repeatedly until test is done
writeFileSync(file, readFileSync(file));
const timer = setInterval(() => writeFileSync(file, readFileSync(file)), 100);
return () => clearInterval(timer);
Expand Down Expand Up @@ -48,6 +49,7 @@ async function spawnWithRestarts({
if (restartsCount >= restarts) {
cancelRestarts?.();
if (!child.kill()) {
// If failed to kill, kill forcefully
setTimeout(() => child.kill('SIGKILL'), 1);
}
return;
Expand Down

0 comments on commit 60a33fa

Please sign in to comment.