mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-18 22:02:49 +08:00
test(windows): daemon-pid-reuse cleanup retries a still-held temp dir (#2304)
afterEach SIGKILLs the servers and the detached daemon, waits 50 ms and removes the temp dir. A killed process releases its handles asynchronously on Windows, and under full-suite load the removal hit EPERM on the VM (the test itself passed; it passes 3/3 alone). Retry the removal like the other process-spawning suites do. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -197,7 +197,9 @@ describe('Shared MCP daemon (issue #411)', () => {
|
||||
}
|
||||
await new Promise((r) => setTimeout(r, 50));
|
||||
servers.length = 0;
|
||||
fs.rmSync(tempDir, { recursive: true, force: true });
|
||||
// A killed process releases its handles asynchronously on Windows; under
|
||||
// full-suite load 50 ms is not always enough, so retry EPERM/EBUSY.
|
||||
fs.rmSync(tempDir, { recursive: true, force: true, maxRetries: 10, retryDelay: 100 });
|
||||
});
|
||||
|
||||
it('takes over after SIGKILL even when the stale PID has been reused (#1553)', async () => {
|
||||
|
||||
Reference in New Issue
Block a user