mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-28 04:03:05 +00:00
test(server): await bounded discard fixture cleanup on Windows
The discard assertions pass but synchronous temporary-directory removal races a Windows lock after daemon cleanup. Use the existing asynchronous rm retry pattern without weakening the behavior assertions.
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
readdirSync,
|
||||
readlinkSync,
|
||||
} from "fs";
|
||||
import { rm } from "node:fs/promises";
|
||||
import { tmpdir } from "os";
|
||||
import path from "path";
|
||||
import { execFileSync } from "node:child_process";
|
||||
@@ -100,7 +101,9 @@ describe("checkout discard", () => {
|
||||
}
|
||||
} finally {
|
||||
// afterEach shuts down the daemon and its repository observers first.
|
||||
onTestFinished(() => rmSync(cwd, { recursive: true, force: true }));
|
||||
onTestFinished(() =>
|
||||
rm(cwd, { recursive: true, force: true, maxRetries: 10, retryDelay: 100 }),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user