Skip to content

Commit ae60e74

Browse files
committed
test: retry temp-dir cleanup to avoid ENOTEMPTY race under load
1 parent 212f488 commit ae60e74

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/agent-core/test/harness/skill-session.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ describe('HarnessAPI session skills', () => {
3333
});
3434

3535
afterEach(async () => {
36-
await rm(tmp, { recursive: true, force: true });
36+
// maxRetries: a late session-journal flush can race the recursive delete
37+
// under full-suite load and throw ENOTEMPTY on macOS.
38+
await rm(tmp, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 });
3739
vi.unstubAllEnvs();
3840
});
3941

0 commit comments

Comments
 (0)