Skip to content

Fix flaky StuckGrain forwarding test#9917

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:copilot/fix-stuck-grain-forward-flake
Feb 15, 2026
Merged

Fix flaky StuckGrain forwarding test#9917
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:copilot/fix-stuck-grain-forward-flake

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Feb 15, 2026

Copy link
Copy Markdown
Member

Summary

  • stabilize StuckGrainTest_StuckDetectionAndForward by removing brittle per-call timeout assertions
  • keep issuing the same non-blocking calls while tolerating either timeout or completion timing
  • assert eventual forwarded-call count using TestingUtils.WaitUntilAsync

Testing

  • dotnet test .\test\TesterInternal\TesterInternal.csproj --filter "FullyQualifiedName~UnitTests.StuckGrainTests.StuckGrainTests.StuckGrainTest_StuckDetectionAndForward" --nologo --verbosity minimal
Microsoft Reviewers: Open in CodeFlow

Stabilize StuckGrainTest_StuckDetectionAndForward by avoiding a brittle per-call timeout expectation and asserting eventual forwarded-call count with TestingUtils.WaitUntilAsync.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 15, 2026 03: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 stabilizes a flaky stuck grain forwarding test by removing timing-dependent assertions and using polling for the final verification.

Changes:

  • Replaced Assert.ThrowsAsync<TimeoutException> for 3 non-blocking calls with Task.WhenAny racing against a delay
  • Changed immediate counter assertion to use TestingUtils.WaitUntilAsync with 10-second timeout and 200ms polling interval
  • Added using Orleans.TestingHost.Utils import

@ReubenBond ReubenBond added this pull request to the merge queue Feb 15, 2026
Merged via the queue into dotnet:main with commit 5d92523 Feb 15, 2026
65 checks passed
@ReubenBond ReubenBond deleted the copilot/fix-stuck-grain-forward-flake branch February 15, 2026 06:02
rkargMsft pushed a commit to rkargMsft/orleans that referenced this pull request Feb 27, 2026
Stabilize StuckGrainTest_StuckDetectionAndForward by avoiding a brittle per-call timeout expectation and asserting eventual forwarded-call count with TestingUtils.WaitUntilAsync.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 17, 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