Skip to content

test: harden the native parity suites (60s budget, fail on missing tools on macOS) - #444

Merged
erickzhao merged 2 commits into
mainfrom
sam/parity-electron-timeout
Aug 10, 2026
Merged

test: harden the native parity suites (60s budget, fail on missing tools on macOS)#444
erickzhao merged 2 commits into
mainfrom
sam/parity-electron-timeout

Conversation

@MarshallOfSound

@MarshallOfSound MarshallOfSound commented Aug 10, 2026

Copy link
Copy Markdown
Member

Two things about the native parity suites, prompted by them failing on #441, #442 and #443 (none of which go near them).

pkg parity with a real Electron.app > produces a byte-identical uncompressed payload timed out at 5010ms on all three. Every case in that describe expands a ~100 MB package (xar + gunzip, or pkgutil --expand-full), so on the shared macOS runners it sits right on vitest's default 5s. The whole describe now gets the same 60s budget sign.spec.ts already uses for its real-app cases. The fixture based suite is fine as is, its slowest case is under half a second.

Second, those suites were gated on describe.runIf(hasNativeTools), so a macOS runner image that lost xar or pkgbuild would skip the parity coverage and stay green (the (skipped) placeholder describes always passed). All of those tools ship with macOS, so the suites now gate on the platform and assertNativeTools() inside, which fails the file with the list of missing tools. Off macOS they still skip, so the Linux job is unaffected (checked by forcing isDarwin to false: 2 files skipped, exit 0, no "no test suite" complaints; and with the tools stripped from PATH the file fails with Missing native packaging tool(s) on this macOS host: pkgbuild, productbuild, lsbom, xar, pkgutil). Same treatment for the pkgutil branch in flat.spec.ts. #442 adds one more hasNativeTools gate to flat.spec.ts, I'll switch it to this helper once this lands.

…sign.spec

Each case expands a ~100 MB package, which sits right on vitest's default
5s on the shared macOS runners; the payload comparison timed out at 5010ms
on three unrelated PRs in a row.

No-Verification-Needed: test-only change
@MarshallOfSound
MarshallOfSound requested a review from a team as a code owner August 10, 2026 06:41
They gated on the tools being present, so a macOS runner image without
xar/pkgbuild/etc would silently skip the parity coverage and stay green.
The tools ship with macOS, so gate on the platform and assert the tools
inside; off macOS the suites still skip.

No-Verification-Needed: test-only change
@MarshallOfSound MarshallOfSound changed the title test: give the real Electron.app parity suite the same 60s budget as sign.spec test: harden the native parity suites (60s budget, fail on missing tools on macOS) Aug 10, 2026
@erickzhao
erickzhao merged commit 856d347 into main Aug 10, 2026
8 checks passed
@erickzhao
erickzhao deleted the sam/parity-electron-timeout branch August 10, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants