Repository navigation
Stabilize the Blazor circuit reconnect test - #70744
BrundhaVelusamy wants to merge 5 commits into
Conversation
Wait for eviction to reach the persistence provider before attempting reconnect, and keep persistence pending until the attempt completes.
|
Thanks for your PR, @BrundhaVelusamy. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the test-only change that explicitly orders circuit eviction and reconnection.
No open issues 🎉
What changed in this PR
Stabilizes the Blazor Server circuit reconnect test for #70699 by explicitly ordering eviction and reconnection, rather than relying on concurrent scheduling. No production code changes.
Changes:
- Adds a provider-entry signal so reconnect runs while persistence is paused.
- Verifies reconnect returns
nulland the circuit is absent from both registries. - Adds bounded waits, releases persistence in
finally, and asserts persistence completion.
| File | Description |
|---|---|
src/Components/Server/test/Circuits/CircuitRegistryTest.cs |
Coordinates eviction, persistence, and reconnect with explicit signals and strengthens assertions. |
Review effort: Balanced
|
/review |
|
Copilot's local review panel found no issues to raise at this commit. Informational checks (non-blocking): The panel examined and discarded concerns about disconnect/persistence sequencing, reconnect timing, cleanup gate release, bounded waits, and the permanent test layer. No unresolved candidate remained, and no candidate reached the verifier because the provisional finding set was empty. Posted for informational purposes so the author can confirm the verifier didn't discard or leave unresolved a real finding; this item does not block Untested coverage gap: No arm completed runtime or browser validation. Two arms were source-only; one scoped test attempt was blocked by incomplete restored build infrastructure ( Validation boundary: Source review of the frozen diff and owning |
|
Please keep this limited to stabilizing the existing reconnect test. Use the smallest synchronization change needed to ensure eviction happens before reconnecting, and avoid expanding the test scenario. |
@kotlarmilos, Thanks for the guidance. I reviewed the current PR diff and confirmed that it already follows this direction:
No further changes were made based on this comment. The focused test and all 20 CircuitRegistryTest tests pass on Windows. |
Description
Connect_WhilePersistingEvictedCircuit_IsInProgressstarted disconnect and reconnect concurrently without enforcing their order. If reconnect ran first, the registry could legitimately transfer the still-active circuit to the new connection. The test then failed because it expected the connected registry to be empty.The test now waits for eviction to reach the persistence provider and holds persistence open during the reconnect attempt. It verifies that reconnect returns
nulland that the circuit is absent from both registries. No production code changed.Validation
Original Linux Helix failure (build 1686243):
Assert.Empty()found a circuit connected asnew-connection.On Windows, an in-process stress run reproduced the same assertion on iteration 2 before the fix. After the fix, all 100 iterations passed.
All 20
CircuitRegistryTesttests passed on Windows. Linux Helix was not rerun.Before:

After

Fixes: #70699