Skip to content

fix(test): remove activation-local reminder waits - #10855

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-reminder-suite-timeouts
Aug 28, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-reminder-suite-timeouts

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

Problem

The reminder test clock driver waited for persisted counters through a waiter attached to whichever grain activation TryGetGrainContext found. During activation churn, a reminder tick could run on another activation: the callback persisted the target counter and emitted TickCompleted, while the waiter on the stale activation remained blocked until the suite timeout.

Solution

Remove the activation-local counter waiter and its test-grain hooks. The clock driver now arms reminder diagnostic waits before advancing time, awaits TickCompleted, and then verifies that each persisted counter advanced exactly once.

Rationale

TickCompleted is emitted only after ReceiveReminder returns, and the test grains persist their counters before returning. This gives the tests an activation-independent completion barrier which remains valid across ownership changes and grain reactivation.

Fixes #10499

Microsoft Reviewers: Open in CodeFlow

Copilot AI lite review requested due to automatic review settings August 27, 2026 21: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.

Copilot review overview

Review tier: Lite
Findings: None

What changed in this PR

This PR improves the stability of reminder-related tests by removing an activation-local “counter waiter” mechanism which could block indefinitely during activation churn, and instead relying on reminder diagnostics (TickCompleted) plus persisted counter verification as an activation-independent completion barrier.

Changes:

  • Reworked AdvanceRemindersByTicksAsync to arm tick diagnostics before time advancement and validate persisted counters after ticks complete.
  • Removed activation-local counter waiter hooks from reminder test grains (and deleted the waiter implementation).
  • Renamed a test to reflect the updated approach (concurrent reminders vs. counter waiters).
File Description
test/​Orleans.Reminders.Tests/​TimerTests/​ReminderTestsBase.cs Switches tick advancement/waiting logic from activation-local counter waiters to diagnostic tick completion + persisted counter assertions.
test/​Orleans.Reminders.Tests/​TimerTests/​ReminderTests_TableGrain.cs Renames a test to match the updated reminder synchronization approach.
test/​Grains/​TestInternalGrains/​ReminderTestGrain2.cs Removes test-only activation-local counter waiter signaling/reset logic and the waiter implementation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings August 27, 2026 21:50
@ReubenBond
ReubenBond force-pushed the rb-fix-reminder-suite-timeouts branch from 74c4031 to 2d8548c Compare August 27, 2026 21:50

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.

Copilot review overview

Review tier: Lite
Findings: None

Copilot AI review requested due to automatic review settings August 28, 2026 03:02
@ReubenBond
ReubenBond force-pushed the rb-fix-reminder-suite-timeouts branch from 2d8548c to 0a553b1 Compare August 28, 2026 03:02

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.

Copilot review overview

Review tier: Lite
Findings: None

@github-actions

Copy link
Copy Markdown
Contributor

Code coverage

78.49% line coverage - 99,375 / 126,605 lines

Coverage details

@ReubenBond
ReubenBond merged commit 41c030c into dotnet:main Aug 28, 2026
76 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-reminder-suite-timeouts branch August 28, 2026 06:46
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 27, 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.

Flaky test: Azure reminder suite times out across multiple cases

2 participants