Stabilize activation rebalancer control test#10131
Merged
Merged
Conversation
Avoid taking a fresh rebalancer report after the test has already observed the timed suspension expire. The extra report can race with the next normal rebalancing session and observe a valid new suspension. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the ControlRebalancerTests.Rebalancer_Should_Be_Controllable_And_Report_To_Listeners functional test by removing a timing race around timed suspension expiry in the activation rebalancer control/reporting flow.
Changes:
- Stop forcing an extra
GetRebalancingReport(true)call after the timed suspension expires. - Assert the already-observed transition back to
RebalancerStatus.Executingand verifySuspensionDurationis null on that same report.
Show a summary per file
| File | Description |
|---|---|
| test/Orleans.Placement.Tests/ActivationRebalancingTests/ControlRebalancerTests.cs | Updates the test to assert the post-expiry executing report without requesting an additional report which could race with a new rebalancing/suspension cycle. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Reason
PR #10126 hit a failure in
ControlRebalancerTests.Rebalancer_Should_Be_Controllable_And_Report_To_Listeners, but the failed test is unrelated to the grain-directory changes in that PR. The test had a timing race after a timed suspension expired.Solution
The test now asserts the report that already observed the rebalancer return to
Executing, instead of forcing a second report. That extra report could race with the next normal rebalancing session and observe a valid new suspension, causing a false failure.This keeps the assertion focused on the behavior under test: the timed suspension expires and returns an executing report with no suspension duration.
Microsoft Reviewers: Open in CodeFlow