You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Journeys: expect.poll's limit is the package's, 30 s - #334
apps/journeys/vitest.config.ts: expect.poll's timeout is 30 s for every poll in the journeys, like patient. Its own 1 s default ran out on a CI runner while one read of the frame was still going (expect.poll() function didn't resolve in time, in Course Presentation's settled).
design/testing.md: one sentence beside the packages' other limits.
Checked: a throwaway test whose poll takes 1.5 s fails with vitest's default, with the same error as CI, and passes with this config. The journeys pass locally (56).
Summary by cubic
Sets the journeys package's expect.poll timeout to 30s so polls don't time out on slower CI runners, fixing the flaky settled failure in Course Presentation (#333).
Polls previously used vitest's 1s default, which ran out mid-frame-read. The limit is now set once in the package config, and design/testing.md documents it alongside the other packages' limits.
Written for commit 07fb164. Summary will update on new commits.
Reviewing files that changed from the base of the PR and between 1243040 and 07fb164.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The journeys Vitest configuration now sets a 30-second timeout for expect.poll. The testing documentation records the setting and an example where a frame read exceeded the default timeout.
Changes: Journeys polling timeout
Layer / File(s)
Summary
Set and document the polling timeout apps/journeys/vitest.config.ts, design/testing.md
The configuration sets expect.poll to 30 seconds and retains the 120-second hook timeout. The documentation describes the polling limit and frame-read example. It also retains the browser project’s 180-second test and hook limits.
This raises the polling timeout in the journeys tests so slow frame reads on loaded CI runners no longer fail at the 1-second default. No production behavior changes, and the change is safe to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the package (Journeys) and the change (expect.poll's limit set to 30 s). It matches the main change, which raises the expect.poll timeout in apps/journeys/vitest.config.ts from Vitest'…
Description check
The description states the problem and the change. It gives the cause (the 1 s default ran out on a CI runner), the scope (every poll in the journeys), and the verification (a throwaway test fails und…
Linked Issues check
[#333] asks for expect.poll's timeout to be set once in apps/journeys/vitest.config.ts to 30 s, like patient. The reviewed diff adds expect: { poll: { timeout: 30_000 } } to the journeys Vites…
Out of Scope Changes check
Both changed files relate to #333. The apps/journeys/vitest.config.ts change is the requested fix. The design/testing.md change adds one sentence that records the journeys' 30 s expect.poll limi…
Full details: Title check
Explanation
The title names the package (Journeys) and the change (expect.poll's limit set to 30 s). It matches the main change, which raises the expect.poll timeout in apps/journeys/vitest.config.ts from Vitest's 1 s default to 30 s.
Full details: Description check
Explanation
The description states the problem and the change. It gives the cause (the 1 s default ran out on a CI runner), the scope (every poll in the journeys), and the verification (a throwaway test fails under the default and passes with the config; the journeys pass locally with 56 tests). It links issue #333. The template's Verification checklist and the Screenshots section are not filled in. The description does not state that documentation was updated, though design/testing.md was changed. The template's checkbox list is not completed, and the description does not mention a test added to the repository, only a throwaway test.
Resolution
Optional: tick the template checklist items that apply (documentation updated; tests pass). Add a note that screenshots are not applicable, or remove that section. Clarify that the throwaway test was not committed, so no test was added.
Full details: Linked Issues check
Explanation
[#333] asks for expect.poll's timeout to be set once in apps/journeys/vitest.config.ts to 30 s, like patient. The reviewed diff adds expect: { poll: { timeout: 30_000 } } to the journeys Vitest config, next to the existing testTimeout and hookTimeout of 120 s. This covers every poll in the journeys, not one test. The PR author reports a throwaway test with a 1.5 s poll fails under the default and passes with this config. The only open point is that the expect.poll config key depends on the installed Vitest version. The diff does not show the Vitest version, so this was not checked against the installed package. The requirement itself is a coding change and it is implemented.
Full details: Out of Scope Changes check
Explanation
Both changed files relate to #333. The apps/journeys/vitest.config.ts change is the requested fix. The design/testing.md change adds one sentence that records the journeys' 30 s expect.poll limit beside the other package limits. #333 names design/testing.md as the source of the rule that limits belong in package config. The sentence is documentation for the change and is not unrelated work. No unrelated changes were found in the reviewed diff.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between e834ada and 1243040.
Files selected for processing: 2
apps/journeys/vitest.config.ts
design/testing.md
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
A poll's own 1 s default ran out on a CI runner while one read of the
Course Presentation frame was still going. The limit is set once in
the package's vitest config, as its test and hook limits are.
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
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.
Closes #333.
apps/journeys/vitest.config.ts:expect.poll's timeout is 30 s for every poll in the journeys, likepatient. Its own 1 s default ran out on a CI runner while one read of the frame was still going (expect.poll() function didn't resolve in time, in Course Presentation'ssettled).design/testing.md: one sentence beside the packages' other limits.Checked: a throwaway test whose poll takes 1.5 s fails with vitest's default, with the same error as CI, and passes with this config. The journeys pass locally (56).
Summary by cubic
Sets the journeys package's
expect.polltimeout to 30s so polls don't time out on slower CI runners, fixing the flakysettledfailure in Course Presentation (#333).Polls previously used vitest's 1s default, which ran out mid-frame-read. The limit is now set once in the package config, and
design/testing.mddocuments it alongside the other packages' limits.Written for commit 07fb164. Summary will update on new commits.