test(server): give the terminal workspace test's cleanup longer on Windows

On Windows the stopped `sleeper` script's process can still hold the project
directory as its working directory when the test removes it, failing cleanup
with EBUSY. rm's retries now wait up to about 5 s for the handle to go.
This commit is contained in:
Mohamed Boudra
2026-11-25 16:46:41 +01:00
parent 1c378330bc
commit a9856f12b6
@@ -25,7 +25,9 @@ afterEach(async () => {
await client.close();
await sdk.close();
await daemon.close();
await rm(cwd, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 });
// Windows releases a stopped script's working directory after the process exits; rm's
// retries wait up to about 5 s for it.
await rm(cwd, { recursive: true, force: true, maxRetries: 10, retryDelay: 100 });
});
test("SDK and workspace handles preserve ownership and actual process directories", async () => {