test: stabilize reminder and activation collection tests#10186
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
ActivationCollectorhelper 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.CollectStaleActivationsmethod 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
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>
7029816 to
893c38d
Compare
This was referenced Jun 14, 2026
This was referenced Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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