From b460160bbd1f6b6cbcc17acecce7faecb12530f6 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Thu, 3 Sep 2026 22:09:18 -0700 Subject: [PATCH] test(crash-reporting): remove the Windows lane marker tree through the retrying helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/main/windows-live-tree-kill.win32.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/windows-live-tree-kill.win32.test.ts b/src/main/windows-live-tree-kill.win32.test.ts index 37a649cf0db..053eb630b88 100644 --- a/src/main/windows-live-tree-kill.win32.test.ts +++ b/src/main/windows-live-tree-kill.win32.test.ts @@ -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) } })