fix(frontend, v1.2): give unit tests timeout headroom for loaded macOS runners - #7736
Draft
github-actions[bot] wants to merge 1 commit into
Draft
Conversation
…ers (#7717) ### What changes were proposed in this PR? The `build / frontend (macos-latest)` leg failed 6 times between 08-14 and 08-17, each time on a **pure timeout in a different spec** — never a failed assertion (details and per-failure table in #7713). The leg's own wall time swings ~2x run to run (9m17s–16m52s), and the same test that runs in ~400ms on ubuntu has been observed at 11s+ inside a `beforeEach` on a loaded macOS runner — while Vitest's default limits (5s test / 10s hook) are fixed absolute values that don't scale with runner load. Nothing in the frontend test setup changed in that window; the margin is simply thin enough that ordinary macOS runner variance crosses it. - Set `testTimeout: 20000` and `hookTimeout: 30000` in `frontend/vitest.config.ts` (which previously set neither, inheriting the 5s/10s defaults) — roughly 4x/3x the worst observed times. Both are needed: 4 of the 6 failures hit the test timeout, 2 hit the hook timeout. - The cost is that a genuinely hung test reports 15–20s later, negligible against a 9–17 minute leg and strictly cheaper than re-running CI and eroding the signal a red leg carries. - `vitest.browser.config.ts` (the browser-mode leg) deliberately keeps the defaults — no timeout failures have been observed there. - Deliberately **not** making the individual specs cheaper: some are expensive on purpose (`hub-search-result` / `search` stand up real child components to work around the coverage-attribution loss in #7458; undoing that would revert #7627 / #7535). ### Any related issues, documentation, discussions? Closes #7713. ### How was this PR tested? - Config-only change with no executable code; the frontend CI legs themselves exercise it by loading `vitest.config.ts` for the full 202-spec / 4704-test suite. - Type-checked the edited config against Vitest's `InlineConfig` typings (`tsc --noEmit` passes — the option names and types are validated), and `prettier --check` passes, so `format:ci` is unaffected. - No spec sets a per-test timeout override (verified by grep), so the global raise applies uniformly. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (claude-opus-4-8) --------- (backported from commit e80add4) Signed-off-by: Meng Wang <mengw15@uci.edu> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
The cherry-pick conflicted and was committed with conflict markers. Resolve the conflicts on this branch, then mark this PR ready for review. Conflicting files:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Automated backport of #7717 to
release/v1.2.Source: e80add4 · automation run
Any related issues, documentation, discussions?
Backport of #7717. Originally linked #7713.
How was this PR tested?
Release-branch CI runs on this branch once the conflicts are resolved and this PR is marked ready for review.
Was this PR authored or co-authored using generative AI tooling?
No.