mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 17:24:32 +00:00
test(perf): dedupe fixtures and reduce flaky waits
This commit is contained in:
@@ -105,7 +105,8 @@ describe("rotateSessionFile", () => {
|
||||
let now = Date.now();
|
||||
const nowSpy = vi.spyOn(Date, "now").mockImplementation(() => (now += 5));
|
||||
try {
|
||||
for (let i = 0; i < 5; i++) {
|
||||
// 4 rotations are enough to verify pruning to <=3 backups.
|
||||
for (let i = 0; i < 4; i++) {
|
||||
await fs.writeFile(storePath, `data-${i}-${"x".repeat(100)}`, "utf-8");
|
||||
await rotateSessionFile(storePath, 50);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user