Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 10 additions & 1 deletion packages/runtime-core/src/provider/publication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,16 @@ mod port_probe_tests {
"published_port_in_use"
);
drop(exact);
require_loopback_port_free(port).unwrap();
// Parallel tests can take a just-released ephemeral port, and a loaded
// runner can time out the probe's connect. Either reads as in use, so
// accept the first of several freshly released ports the probe clears.
let freed = (0..20).any(|_| {
let probe = TcpListener::bind((Ipv4Addr::LOCALHOST, 0)).unwrap();
let port = probe.local_addr().unwrap().port();
drop(probe);
require_loopback_port_free(port).is_ok()
});
assert!(freed, "the probe never accepted a released loopback port");
// A wildcard listener would share loopback traffic under SO_REUSEADDR.
let wildcard = TcpListener::bind((Ipv4Addr::UNSPECIFIED, 0)).unwrap();
let port = wildcard.local_addr().unwrap().port();
Expand Down
6 changes: 3 additions & 3 deletions tests/doctor-fix-noninteractive.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ test("doctor --fix under HACK_NO_INTERACTIVE clears a stale daemon pid without p
expect(runCalls).toEqual(
expect.arrayContaining([expect.arrayContaining(["daemon", "clear"])])
);
});
}, 30_000);

test("doctor --fix under HACK_NO_INTERACTIVE skips macOS keychain repair and reports it", async () => {
const projectRoot = await createProjectWithStaleDaemonPid();
Expand All @@ -273,7 +273,7 @@ test("doctor --fix under HACK_NO_INTERACTIVE skips macOS keychain repair and rep
if (skippedNote !== undefined) {
expect(skippedNote).not.toContain("Repair macOS host TLS trust");
}
});
}, 30_000);

test("doctor --fix never calls the raw clack confirm prompt under HACK_NO_INTERACTIVE", async () => {
const projectRoot = await createProjectWithStaleDaemonPid();
Expand All @@ -291,7 +291,7 @@ test("doctor --fix never calls the raw clack confirm prompt under HACK_NO_INTERA
// proves every prompt site in the --fix path routed through confirmSafe's
// non-interactive branch instead of the raw clack prompt.
expect(code).toBe(0);
});
}, 30_000);

test("doctor --fix creates a missing .hack/.gitignore and keeps user lines on a repair (HACK-1278)", async () => {
const projectRoot = await createProjectWithStaleDaemonPid();
Expand Down
Loading