Skip to content

Run the slow last read tests on a fake clock - #1029

Merged
kblok merged 1 commit into
mainfrom
issue-1006-fake-clock
Nov 4, 2026
Merged

kblok merged 1 commit into
mainfrom
issue-1006-fake-clock

Conversation

@kblok

@kblok kblok commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

a slow last read raced a real Stopwatch against real 350 ms waits. On a loaded runner the banner time and the last read drifted apart, and waitFor timed out with "matched 0 nodes". The two tests now run on the stepping fake clock: each read moves the clock by 350 ms, so the banner shows at 1050 ms of fake time and the last read (which ends at 1150 ms) sees it. Both tests now take about 25 ms.

Most other tests in the issue were already made deterministic by earlier PRs (#930, #956, #950, #893 and others). Their runs were from before those merged. I ran each remaining test 100 times with 4 parallel processes on current main plus this change: no failure in the clock-based tests.

Upstream change ported: none. The tests keep the names and layout of upstream's a slow last read (tester-army/e2e locator-wait-for tests). No new symbols, no public API change.

Not covered (issue stays open):

  • ManagedProcessTests.Cancels_an_in_flight_readiness_probe(startup) fails when the spawned app exits with code 137 (known sandbox failure). It does not race a deadline, so a fake clock does not help. It needs a separate look on a real CI runner.
  • ToHaveScreenshotTests still has one real 1100 ms delay against a 1 s budget in a neighbouring test (not in the issue).

Refs #1006

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 7 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 9a80390 and c4ea0cb.

Files selected for processing: 1
  • tests/E2E.Tests/LocatorWaitFor/ASlowLastReadTests.cs
  • 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

@kblok

kblok commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kblok
kblok merged commit e65ec64 into main Nov 4, 2026
4 checks passed
@kblok
kblok deleted the issue-1006-fake-clock branch November 4, 2026 11:11
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.

1 participant