Skip to content

test: stabilize timer tests with FakeTimeProvider#10216

Merged
ReubenBond merged 3 commits into
mainfrom
rebond/slow-tests-runtime-timers
Jun 12, 2026
Merged

test: stabilize timer tests with FakeTimeProvider#10216
ReubenBond merged 3 commits into
mainfrom
rebond/slow-tests-runtime-timers

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Jun 11, 2026

Copy link
Copy Markdown
Member

This fixes the timer test flake by removing wall-clock waits from the timer test flow. The timer test cluster now uses a FakeTimeProvider for grain timers, timer callback delays consume the injected TimeProvider, and tests drive callbacks using timer and callback diagnostic events so fake time is advanced only after the callback delay is registered.

Microsoft Reviewers: Open in CodeFlow

Use FakeTimeProvider for the timer test cluster and drive timer ticks through diagnostic events instead of wall-clock delays. Inject TimeProvider into timer grains so callback delays are advanced deterministically by the tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ReubenBond ReubenBond force-pushed the rebond/slow-tests-runtime-timers branch from c548f8d to 9fe803a Compare June 11, 2026 23:17
@ReubenBond ReubenBond changed the title test: stabilize timer tests with fake time test: stabilize timer tests with FakeTimeProvider Jun 11, 2026
Comment thread test/Grains/TestInternalGrains/TimerGrain.cs Fixed
Comment thread test/Grains/TestInternalGrains/TimerGrain.cs Fixed
Comment thread test/Grains/TestInternalGrains/TimerGrain.cs Fixed
Comment thread test/Grains/TestInternalGrains/TimerGrain.cs Fixed
ReubenBond and others added 2 commits June 12, 2026 08:36
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ReubenBond ReubenBond merged commit ae88af8 into main Jun 12, 2026
64 checks passed
@ReubenBond ReubenBond deleted the rebond/slow-tests-runtime-timers branch June 12, 2026 17:43
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