Skip to content

Fix flaky ResumeAfterSlowSubscriber on slow machines#9918

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:copilot/fix-resume-slow-subscriber-flake-20260215-054753
Feb 15, 2026
Merged

Fix flaky ResumeAfterSlowSubscriber on slow machines#9918
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:copilot/fix-resume-slow-subscriber-flake-20260215-054753

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Feb 15, 2026

Copy link
Copy Markdown
Member

Summary

  • replace fixed 500ms sleeps in ResumeAfterSlowSubscriber with TestingUtils.WaitUntilAsync
  • assert eventual fast subscriber counters with timeout-backed polling to remove timing race on slow machines

Testing

  • dotnet test test\Tester\Tester.csproj --filter "FullyQualifiedName~Tester.StreamingTests.MemoryStreamResumeTests.ResumeAfterSlowSubscriber" (run 3 times)
  • dotnet test test\Tester\Tester.csproj --filter "FullyQualifiedName~Tester.StreamingTests.MemoryStreamResumeTests" --no-build
Microsoft Reviewers: Open in CodeFlow

Copilot AI review requested due to automatic review settings February 15, 2026 13:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a flaky test by replacing fixed-time delays with timeout-backed polling assertions. The test ResumeAfterSlowSubscriber was failing intermittently on slow machines because it used 500ms Task.Delay calls that were insufficient for the assertions to pass reliably.

Changes:

  • Replaced two Task.Delay(500) + immediate assertion patterns with TestingUtils.WaitUntilAsync polling
  • Added a local async helper function CheckFastCounter that implements the polling predicate with assertion on final try
  • Added using Orleans.TestingHost.Utils import for TestingUtils access

Replace fixed 500ms delays with TestingUtils.WaitUntilAsync eventual assertions so slow machines do not fail before stream delivery completes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ReubenBond ReubenBond force-pushed the copilot/fix-resume-slow-subscriber-flake-20260215-054753 branch from cc8818f to a77a1a0 Compare February 15, 2026 14:04
@ReubenBond ReubenBond enabled auto-merge February 15, 2026 14:05
@ReubenBond ReubenBond added this pull request to the merge queue Feb 15, 2026
Merged via the queue into dotnet:main with commit c595ad9 Feb 15, 2026
59 checks passed
@ReubenBond ReubenBond deleted the copilot/fix-resume-slow-subscriber-flake-20260215-054753 branch February 15, 2026 16:06
rkargMsft pushed a commit to rkargMsft/orleans that referenced this pull request Feb 27, 2026
Fix flaky ResumeAfterSlowSubscriber test

Replace fixed 500ms delays with TestingUtils.WaitUntilAsync eventual assertions so slow machines do not fail before stream delivery completes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants