Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/cli/src/capture/publicNetwork.process.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { expect, it, onTestFinished } from "vitest";
import { startTestDnsServer } from "../utils/dnsTestServer.js";
import { testProcessIsAlive } from "../utils/processTestUtils.js";
import { testProcessIsAlive, waitForTestCondition } from "../utils/processTestUtils.js";
import { systemLookupInKillableChild } from "./publicNetwork.js";

const fixture = join(dirname(fileURLToPath(import.meta.url)), "publicNetwork.fixture.ts");
Expand Down Expand Up @@ -76,7 +76,7 @@ it("leaves no system lookup running when the CLI exits mid-lookup", async () =>
const pid = Number(/^exit (\d+)$/m.exec(run.printed)?.[1]);
onTestFinished(() => void (testProcessIsAlive(pid) && process.kill(pid, "SIGKILL")));
expect(pid).toBeGreaterThan(0);
expect(testProcessIsAlive(pid)).toBe(false);
await waitForTestCondition(() => !testProcessIsAlive(pid), 5_000);
}, 30_000);

it("runs the real system lookup in its child", async () => {
Expand Down
Loading