1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

chore(ext/node): ignore non-working process test (#22723)

Filed https://github.com/denoland/deno/issues/22724 for actual issue
This commit is contained in:
Matt Mastracci 2024-03-05 21:21:28 -07:00 committed by GitHub
parent adb0226927
commit fac7068c1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -185,7 +185,11 @@ Deno.test({
name: "process.on signal",
ignore: Deno.build.os == "windows",
async fn() {
const testTimeout = setTimeout(() => fail("Test timed out"), 10_000);
let wait = "";
const testTimeout = setTimeout(
() => fail("Test timed out waiting for " + wait),
10_000,
);
try {
const process = new Deno.Command(Deno.execPath(), {
args: [
@ -206,16 +210,19 @@ Deno.test({
process.stdout.pipeThrough(new TextDecoderStream()).pipeTo(
new WritableStream({
write(chunk) {
console.log("chunk:", chunk);
output += chunk;
},
}),
);
wait = "ready";
while (!output.includes("ready\n")) {
await delay(10);
}
output = "";
for (const _ of Array(3)) {
for (const i of Array(3)) {
output = "";
process.kill("SIGINT");
wait = "foo " + i;
while (!output.includes("foo\n")) {
await delay(10);
}
@ -230,7 +237,7 @@ Deno.test({
Deno.test({
name: "process.off signal",
ignore: Deno.build.os == "windows",
ignore: true, // This test fails to terminate
async fn() {
const testTimeout = setTimeout(() => fail("Test timed out"), 10_000);
try {
@ -243,7 +250,7 @@ Deno.test({
setInterval(() => {}, 1000);
const listener = () => {
console.log("foo");
process.off("SIGINT")
process.off("SIGINT", listener)
};
process.on("SIGINT", listener);
`,
@ -255,6 +262,7 @@ Deno.test({
process.stdout.pipeThrough(new TextDecoderStream()).pipeTo(
new WritableStream({
write(chunk) {
console.log("chunk:", chunk);
output += chunk;
},
}),