Skip to content

Journeys: expect.poll's limit is the package's, 30 s - #334

Merged
alekswebnet merged 1 commit into
mainfrom
test/journeys-poll-limit
Dec 3, 2026
Merged

alekswebnet merged 1 commit into
mainfrom
test/journeys-poll-limit

Conversation

@alekswebnet

@alekswebnet alekswebnet commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #333.

  • 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.

View guided diff Turn on auto-fix

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

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.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other · Severity of issue fixed: Medium

Merge Risk: Minimal · previous review 12430

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed [#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 Passed 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.

Share

Recent review info

Run configuration

Commits

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.
@alekswebnet
alekswebnet force-pushed the test/journeys-poll-limit branch from 1243040 to 07fb164 Compare December 3, 2026 06:33
@alekswebnet
alekswebnet merged commit c87509d into main Dec 3, 2026
11 checks passed
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.

Journeys: expect.poll's 1 s default fails on a slow runner

1 participant