Stabilize backup request policy test cleanup - #3564
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This PR stabilizes the TestBackupRequestPolicy unit test by avoiding a fatal assertion while waiting for short connections to close, ensuring the acceptor is always stopped/joined before reporting a failure (especially on slow CI runners).
Changes:
- Replace a fatal 100ms timeout assertion with a non-fatal timeout flag and post-cleanup expectation.
- Increase the wait time for short-connection cleanup to 1 second to reduce CI flakiness.
- Ensure
StopAndJoin()runs even when the close-wait times out by breaking out of the parameter loop and reporting afterward.
| File | Description |
|---|---|
| test/brpc_channel_unittest.cpp | Makes short-connection cleanup waiting non-fatal and increases timeout to reduce test flakiness while preserving cleanup (StopAndJoin()). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
wasphin
force-pushed
the
fix-channel-backup-policy-test
branch
from
September 25, 2026 14:58
d4dede8 to
309ecf2
Compare
Member
Author
|
A flaky unit-test is fixed by #3567 |
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.

What problem does this PR solve?
Issue Number: N/A
Problem Summary:
The backup request policy test used a fatal assertion while waiting for short
connections to close. On a slow CI runner, the assertion could return from the
helper before
StopAndJoin(), leaving the acceptor active while later parametercombinations continued to run.
What is changed and the side effects?
Changed:
Record a connection-close timeout, stop and join the acceptor, and then report
the failure. Allow up to one second for asynchronous short-connection cleanup
so the test does not enforce a 100 ms timing assumption unrelated to backup
request policy behavior.
Side effects:
Performance effects: Test-only change; no production performance impact.
Breaking backward compatibility: No.
Check List: