test(server): retry removing the restart test's directories on Windows

Windows reported EBUSY removing the agent directory right after the
second daemon closed. Retry the removal as the test daemon's own
cleanup does.
This commit is contained in:
Mohamed Boudra
2026-11-25 08:06:49 +01:00
parent 13734eeba9
commit ddd23f4cf9
@@ -142,10 +142,9 @@ describe("paseo daemon bootstrap", () => {
await second.close();
}
} finally {
await Promise.all([
rm(paseoHomeRoot, { recursive: true, force: true }),
rm(agentCwd, { recursive: true, force: true }),
]);
// Windows can hold a closed daemon's directory handles briefly, as in `removeDirs`.
const retry = { recursive: true, force: true, maxRetries: 3, retryDelay: 100 };
await Promise.all([rm(paseoHomeRoot, retry), rm(agentCwd, retry)]);
}
});