Skip to content

Fix flaky stuck-grain deactivation test on slow runners#9931

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:copilot/fix-stuck-grain-deactivation-timeout
Feb 16, 2026
Merged

Fix flaky stuck-grain deactivation test on slow runners#9931
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:copilot/fix-stuck-grain-deactivation-timeout

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Feb 16, 2026

Copy link
Copy Markdown
Member

Summary

Fixes flaky StuckGrainTest_StuckDetectionOnDeactivation failures on slow macOS runners.

What changed

  • Replaced strict per-call timeout assertions for the first 3 calls with non-blocking enqueue behavior checks.
  • Added TestingUtils.WaitUntilAsync assertion to deterministically verify those 3 calls are forwarded and processed.
  • Kept the final assertion that total processed calls is 4 after an additional call.

Validation

  • dotnet test .\test\TesterInternal\TesterInternal.csproj --filter "FullyQualifiedName~UnitTests.StuckGrainTests.StuckGrainTests" --no-restore --tl:off -v minimal
  • Repeated StuckGrainTest_StuckDetectionOnDeactivation 5x on net8.0 with all passing.
Microsoft Reviewers: Open in CodeFlow

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 16, 2026 22:36

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 (StuckGrainTest_StuckDetectionOnDeactivation) that was failing on slow macOS runners by replacing strict per-call timeout assertions with a more lenient approach.

Changes:

  • Replaced Assert.ThrowsAsync<TimeoutException> for each of 3 calls with non-blocking Task.WhenAny pattern
  • Added TestingUtils.WaitUntilAsync polling assertion to verify the 3 calls are eventually processed
  • Maintained the final assertion that 4 total calls are processed after an additional awaited call

@ReubenBond ReubenBond enabled auto-merge February 16, 2026 23:01
@ReubenBond ReubenBond added this pull request to the merge queue Feb 16, 2026
Merged via the queue into dotnet:main with commit 595ee91 Feb 16, 2026
65 checks passed
@ReubenBond ReubenBond deleted the copilot/fix-stuck-grain-deactivation-timeout branch February 16, 2026 23:53
rkargMsft pushed a commit to rkargMsft/orleans that referenced this pull request Feb 27, 2026
Fix deactivation stuck-grain test flakiness

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