Raise vitest testTimeout to absorb per-file parser init#2822
Merged
NullVoxPopuli merged 1 commit intoJul 3, 2026
Merged
Conversation
Vitest isolates each test file, so the first RuleTester case in every file re-pays ~1-1.5s of ember-eslint-parser initialization (content-tag wasm compile, typescript-eslint machinery). Under CPU contention that first case can exceed the default 5s per-test timeout, failing a random valid case per run — the suite is flaky on loaded machines. Reproduced deterministically by running the suite alongside six busy-loops on a 4-core box; with a 30s timeout the same load passes all 9538 tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
NullVoxPopuli
approved these changes
Jul 3, 2026
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.
Symptom
On a loaded machine, the suite fails 1–20+ random
validcases per run, a different set each time. The failure is always:from inside ESLint's RuleTester — never an actual wrong assertion.
Mechanism
no-array-prototype-extensions(588ms first case, TS-heavy) is affected too, matching what actually fails in practice.Verification
Reproduced deterministically on a 4-core machine: running the suite alongside six
yes > /dev/nullbusy-loops failstemplate-no-unbound > valid > <template>{{foo}}</template>at exactly 5000ms. WithtestTimeout: 30_000and the same load, all 9538 tests pass.Alternative considered
Warming the parser in a
setupFileshook would shave the per-file cost instead of tolerating it, but the init happens lazily inside the parser on first parse per module registry, so it would need to import and exercise the parser in every isolated context anyway — the timeout bump is the simpler, standard remedy and doesn't change what the tests exercise.🤖 Generated with Claude Code