fix(e2e): reach child quiescence before temp-dir cleanup in built-bin smokes
The acp built-bin smoke killed its child and immediately rm'd the temp consumer dir; POSIX tolerates unlinking a live process's cwd, Windows fails EBUSY while the child still holds its cwd and session-log handles (the CI windows job's only red step). Await the child's exit after SIGKILL and give both smokes' rm a brief retry for the OS handle-release lag.
This commit is contained in:
@@ -116,7 +116,8 @@ function runBuiltBin(cwd: string, configArg: string, line: string): Promise<{ st
|
||||
let consumer: string | undefined
|
||||
|
||||
afterEach(async () => {
|
||||
if (consumer !== undefined) await rm(consumer, { recursive: true, force: true })
|
||||
// Windows can briefly retain released handles after exit; retry removal.
|
||||
if (consumer !== undefined) await rm(consumer, { recursive: true, force: true, maxRetries: 10, retryDelay: 100 })
|
||||
consumer = undefined
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user