Skip to content

Fix flaky NonReentrantGrainTimer_NoKeepAlive_Test#9925

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:fix/nonreentrant-timer-nokeepalive-flake
Feb 16, 2026
Merged

Fix flaky NonReentrantGrainTimer_NoKeepAlive_Test#9925
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:fix/nonreentrant-timer-nokeepalive-flake

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Feb 16, 2026

Copy link
Copy Markdown
Member

Summary

  • fix NonReentrantGrainTimer_NoKeepAlive_Test flakiness by aligning timer scheduling with the test's intent
  • change the test timer due time from 4s to 30s so the timer cannot fire before idle collection executes

Testing

  • dotnet test test/TesterInternal/TesterInternal.csproj --filter "FullyQualifiedName=UnitTests.ActivationsLifeCycleTests.ActivationCollectorTests.NonReentrantGrainTimer_NoKeepAlive_Test" (run repeatedly; 10/10 passed post-fix)
Microsoft Reviewers: Open in CodeFlow

Use a 30-second timer due time in the no-keepalive activation collector test so the timer does not fire before collection, matching the test intent and removing timing race.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 16, 2026 16:59
@ReubenBond ReubenBond enabled auto-merge February 16, 2026 17:01

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 (NonReentrantGrainTimer_NoKeepAlive_Test) that was experiencing race condition issues due to incorrect timer scheduling. The test verifies that a timer with keepAlive=false does not prevent grain deactivation during idle collection.

Changes:

  • Changed the timer due time from 4 seconds to 30 seconds in the NonReentrantGrainTimer_NoKeepAlive_Test to ensure the timer cannot fire before the grain is collected

@ReubenBond ReubenBond added this pull request to the merge queue Feb 16, 2026
Merged via the queue into dotnet:main with commit 2630994 Feb 16, 2026
65 checks passed
@ReubenBond ReubenBond deleted the fix/nonreentrant-timer-nokeepalive-flake branch February 16, 2026 18:15
rkargMsft pushed a commit to rkargMsft/orleans that referenced this pull request Feb 27, 2026
Use a 30-second timer due time in the no-keepalive activation collector test so the timer does not fire before collection, matching the test intent and removing timing race.

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