Skip to content

test: stabilize reminder and activation collection tests#10186

Merged
ReubenBond merged 2 commits into
mainfrom
reubenbond/stabilize-timing-tests
Jun 11, 2026
Merged

test: stabilize reminder and activation collection tests#10186
ReubenBond merged 2 commits into
mainfrom
reubenbond/stabilize-timing-tests

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Jun 8, 2026

Copy link
Copy Markdown
Member

Two Functional tests depended on startup and collector timing, which made them vulnerable to slow CI runs. This changes them to wait for observable readiness or convergence instead of relying on fixed delays.

The minimal reminder test now retries only while the reminder service reports that it is still initializing, waits until the registered reminder is readable, and then stops it. The activation collection test now triggers the same stale-activation collection path used by the collector timer through an internal test hook, verifies the default collection age does not collect the target grain type, and waits for the target activation count to converge to zero under the class-specific age limit.

Microsoft Reviewers: Open in CodeFlow

@ReubenBond ReubenBond changed the title test: stabilize timing-sensitive functional tests test: stabilize reminder and activation collection tests Jun 9, 2026
@ReubenBond ReubenBond requested a review from Copilot June 10, 2026 20:06

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 two Functional tests which were previously sensitive to CI timing by replacing fixed delays with readiness/convergence-based waiting and by adding an internal test hook to deterministically trigger the same activation-collection path used by the runtime’s collector timer.

Changes:

  • Updates the activation-collection functional test to force stale-activation scans via a new internal ActivationCollector helper and to wait for activation-count convergence instead of sleeping a fixed duration.
  • Updates the minimal reminder functional test to retry reminder operations only while the reminder service is initializing and to wait until a created reminder is readable before stopping it.
  • Adds an internal ActivationCollector.CollectStaleActivations method to expose the collector’s stale-scan path for internal tests.
Show a summary per file
File Description
test/Orleans.Runtime.Internal.Tests/ActivationsLifeCycleTests/ActivationCollectorTests.cs Reworks the class-specific collection-age test to use deterministic stale-collection triggering and convergence waiting.
test/Orleans.Reminders.Tests/MinimalReminderTests.cs Adds initialization-aware retry loops around reminder start/read/stop to avoid fixed timing assumptions.
src/Orleans.Runtime/Catalog/ActivationCollector.cs Introduces an internal method to invoke the stale activation scan path used by the collection timer.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 2

Comment thread test/Orleans.Reminders.Tests/MinimalReminderTests.cs Outdated
ReubenBond and others added 2 commits June 10, 2026 17:54
Wait for reminder service readiness in the minimal reminder test and drive activation collection through a convergence-based test hook instead of fixed timing delays.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ReubenBond ReubenBond force-pushed the reubenbond/stabilize-timing-tests branch from 7029816 to 893c38d Compare June 11, 2026 00:54
@ReubenBond ReubenBond merged commit 998dc82 into main Jun 11, 2026
64 checks passed
@ReubenBond ReubenBond deleted the reubenbond/stabilize-timing-tests branch June 11, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants