mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-14 23:26:39 +03:00
Retry the doctor-test scratch cleanup to kill a Node 22 CI flake
The suite runs real git subprocesses in its scratch dir, and on Node 22 the recursive afterEach delete raced git's object writes: rmdir of .git/objects threw ENOTEMPTY and failed an unrelated PR's CI run (seen on the #418 rebase run, checkDesignDrift suite). rmSync's maxRetries/retryDelay options exist for exactly these transient errors. Prepared with AI assistance (Claude Code), directed by @pbakaus. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Code
parent
d272b9bd5d
commit
f3a6bb5a38
@@ -39,7 +39,11 @@ beforeEach(() => {
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
fs.rmSync(scratch, { recursive: true, force: true });
|
||||
// These tests run real git subprocesses in the scratch dir; on Node 22 a
|
||||
// recursive delete can race git's object writes and fail the whole test
|
||||
// with ENOTEMPTY (seen in CI). maxRetries/retryDelay make rmSync retry
|
||||
// exactly those transient errors.
|
||||
fs.rmSync(scratch, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 });
|
||||
});
|
||||
|
||||
function write(rel, body) {
|
||||
|
||||
Reference in New Issue
Block a user