mirror of
https://github.com/denoland/deno
synced 2024-08-25 02:57:22 +00: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:
parent
adb0226927
commit
fac7068c1e
|
@ -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;
|
||||
},
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue