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
10 changes: 9 additions & 1 deletion tests/clients/client-link-runtime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,15 @@ test("an ended link recycles a connected sibling after listener cleanup", async
if (child) await child.exited;
if (replacementPid !== null) {
try { process.kill(replacementPid, "SIGTERM"); } catch { /* already exited */ }
await waitFor(() => existsSync(join(home, "runtime-port.json")) ? null : true, "replacement shutdown");
await waitFor(() => {
try { return process.kill(replacementPid, 0) ? null : true; }
catch { return true; }
}, "replacement process exit");
// Windows SIGTERM is TerminateProcess, so no signal/exit handler removes the runtime
// record. The fixture cleanup owns that stale file after proving the process is gone.
if (process.platform !== "win32") {
await waitFor(() => existsSync(join(home, "runtime-port.json")) ? null : true, "replacement runtime cleanup");
}
}
if (priorHome === undefined) delete process.env.OPENCODEX_HOME;
else process.env.OPENCODEX_HOME = priorHome;
Expand Down
Loading