test(crash-reporting): remove the Windows lane marker tree through the retrying helper

The new win32 spec teardown used a raw rmSync, which the windows-lane-tree-removal
boundary ratchet rejects — and which is exactly the EPERM the ratchet exists to
prevent, since this spec's marker directory is written by processes it has just
force-killed.
This commit is contained in:
Neil
2026-09-03 22:09:18 -07:00
parent 376853aa52
commit b460160bbd
@@ -1,4 +1,4 @@
import { existsSync, mkdtempSync, readFileSync, rmSync } from 'node:fs'
import { existsSync, mkdtempSync, readFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { spawn, type ChildProcess } from 'node:child_process'
@@ -6,6 +6,7 @@ import { afterAll, afterEach, beforeEach, describe, expect, it } from 'vitest'
import { setAppEnvironment, type AppEnvironment } from '../shared/app-environment'
import { setProcessTreeKillGate } from '../shared/child-process/process-tree-kill-gate'
import { signalProcessTree } from '../shared/child-process/process-tree-termination'
import { removeTreeSync } from '../shared/windows-transient-lock-removal'
import {
findSelfInitiatedTreeKills,
resetSelfInitiatedTreeKillLogForTest
@@ -115,7 +116,7 @@ describeOnWindows('own-Chromium gate against real Windows process trees', () =>
afterAll(() => {
if (markerDirectory) {
rmSync(markerDirectory, { recursive: true, force: true })
removeTreeSync(markerDirectory)
}
})