Give defaults to the built-in default query test a 20s timeout#4268
Merged
trevor-scheer merged 1 commit intoMay 14, 2026
Merged
Conversation
Monaco's editor worker cold start takes longer under Vitest 4's `forks` pool, causing this test to time out at the default 9s in CI.
|
trevor-scheer
added a commit
that referenced
this pull request
May 14, 2026
…4270) ## Summary Follow-up to #4268. That PR bumped `testTimeout` to 20s for this test but missed the second 9s ceiling: `configure({ asyncUtilTimeout: 9_000 })` in `packages/graphiql/setup-files.ts`. RTL's `waitFor` gives up at the asyncUtilTimeout regardless of how big the `it()` timeout is — its final assertion then runs against a `null` `queryEditor` and fails with `expect(...).toBeVisible()` instead of the original "Test timed out" message. Evidence the previous fix was luck-of-the-draw: #4268 passed because Monaco cold-booted at 7927ms — 73ms under the 9s cliff. #4266 failed at 9066ms on the same fix because Monaco took longer that run. This PR adds `{ timeout: 15_000 }` to the `waitFor(...)` call so the polling window matches the test's 20s ceiling. Keeps `it(..., 20000)` so the two timeouts don't race in the other direction.
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.
Summary
Times out at the default 9s on every CI run since Vitest 4 landed (#4260). It's the only test in
GraphiQL.spec.tsxthat boots Monaco'seditorWorkerServicefrom a cold start; the rest get a warm worker. Vitest 4's pool switch fromthreadstoforkspushed cold-boot just past 9s.Bumped to 20s on this one test, with an inline comment explaining why for the next person.
Failed on two back-to-back runs of an unrelated PR: