mirror of
https://github.com/denoland/deno.git
synced 2025-01-09 07:39:15 -05:00
chore(cli): unflake signal test (#21185)
If these tests do eventually break, they'll time out.
This commit is contained in:
parent
5fbf3d99a2
commit
fe0d9e078f
1 changed files with 14 additions and 6 deletions
|
@ -122,13 +122,15 @@ Deno.test(
|
||||||
await delay(20);
|
await delay(20);
|
||||||
Deno.kill(Deno.pid, "SIGUSR1");
|
Deno.kill(Deno.pid, "SIGUSR1");
|
||||||
}
|
}
|
||||||
await delay(20);
|
await promise;
|
||||||
Deno.removeSignalListener("SIGUSR1", listener);
|
Deno.removeSignalListener("SIGUSR1", listener);
|
||||||
resolve();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
await promise;
|
// We'll get three signals eventually
|
||||||
assertEquals(c, 3);
|
while (c < 3) {
|
||||||
|
await delay(20);
|
||||||
|
}
|
||||||
|
resolve();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -154,7 +156,9 @@ Deno.test(
|
||||||
await delay(20);
|
await delay(20);
|
||||||
Deno.kill(Deno.pid, "SIGUSR2");
|
Deno.kill(Deno.pid, "SIGUSR2");
|
||||||
}
|
}
|
||||||
await delay(20);
|
while (c.length < 6) {
|
||||||
|
await delay(20);
|
||||||
|
}
|
||||||
Deno.removeSignalListener("SIGUSR2", listener1);
|
Deno.removeSignalListener("SIGUSR2", listener1);
|
||||||
// Sends SIGUSR2 3 times.
|
// Sends SIGUSR2 3 times.
|
||||||
for (const _ of Array(3)) {
|
for (const _ of Array(3)) {
|
||||||
|
@ -167,7 +171,11 @@ Deno.test(
|
||||||
await delay(20);
|
await delay(20);
|
||||||
Deno.kill(Deno.pid, "SIGUSR1");
|
Deno.kill(Deno.pid, "SIGUSR1");
|
||||||
}
|
}
|
||||||
await delay(20);
|
|
||||||
|
while (c.length < 9) {
|
||||||
|
await delay(20);
|
||||||
|
}
|
||||||
|
|
||||||
Deno.removeSignalListener("SIGUSR2", listener0);
|
Deno.removeSignalListener("SIGUSR2", listener0);
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue