fix(test): retry busy git transport fixture cleanup

Bound temporary-directory removal retries after probes and HTTP fixtures
finish, preserving cleanup errors when retries are exhausted.
This commit is contained in:
LogosVeritas committed 2026-10-26 13:45:06 +08:00
1 parent a2bf1d8c4d
commit 0939fd6549
1 file changed
+2 -1
@@ -26,7 +26,8 @@ const SSH_SPEC = `git+ssh://[email protected]/team/sub/plugin.git#${'a'.repeat(40)
async function fixture() {
const dir = await mkdtemp(join(tmpdir(), 'dsh-git-transport-'))
onTestFinished(() => rm(dir, { recursive: true, force: true }))
// Retry Windows directory-busy errors after awaited probe cleanup.
onTestFinished(() => rm(dir, { recursive: true, force: true, maxRetries: 10, retryDelay: 100 }))
const config = join(dir, 'git.config')
await writeFile(config, '')
const env = { GIT_CONFIG_GLOBAL: config, GIT_CONFIG_NOSYSTEM: '1' }