Skip to content

Fix flake in StuckGrainTest_StuckDetectionOnDeactivation - #9915

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

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:fix-stuck-grain

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Feb 14, 2026 •

Copy link
Copy Markdown
Member

Summary: make WaitForDeactivationStart deterministic by waiting up to 10 seconds and throwing TimeoutException when deactivation does not start. Validation: targeted test passed plus 20 repeated net10.0 runs and a cross-TFM run.

Microsoft Reviewers: Open in CodeFlow

Increase deactivation-start wait determinism in test helper by waiting up to 10 seconds and throwing a TimeoutException when deactivation does not begin, preventing false-forward assertions in flaky CI runs.

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

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) by making the WaitForDeactivationStart method more deterministic. The change increases the wait timeout from 1 second to 10 seconds and adds proper error handling by throwing a TimeoutException when deactivation doesn't start within the timeout period, rather than silently returning after the wait.

Changes:

  • Modified StuckGrain.WaitForDeactivationStart to wait up to 10 seconds (increased from 1 second) and throw a TimeoutException with a descriptive message if the grain deactivation doesn't start within that time

Comment thread test/Grains/TestGrains/StuckGrain.cs Resolved
@ReubenBond
ReubenBond enabled auto-merge February 14, 2026 22:30
@ReubenBond
ReubenBond added this pull request to the merge queue Feb 14, 2026
github-merge-queue Bot pushed a commit that referenced this pull request Feb 14, 2026
Fix stuck grain deactivation test synchronization

Increase deactivation-start wait determinism in test helper by waiting up to 10 seconds and throwing a TimeoutException when deactivation does not begin, preventing false-forward assertions in flaky CI runs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Feb 14, 2026
@ReubenBond
ReubenBond added this pull request to the merge queue Feb 15, 2026
Merged via the queue into dotnet:main with commit a1b708d Feb 15, 2026
65 checks passed
@ReubenBond
ReubenBond deleted the fix-stuck-grain branch February 15, 2026 01:55
rkargMsft pushed a commit to rkargMsft/orleans that referenced this pull request Feb 27, 2026
Fix stuck grain deactivation test synchronization

Increase deactivation-start wait determinism in test helper by waiting up to 10 seconds and throwing a TimeoutException when deactivation does not begin, preventing false-forward assertions in flaky CI runs.

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