test: stabilize flaky TestMainBackupLoop#69364
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIn ChangesFix flaky TestMainBackupLoop with deterministic store selection
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What problem does this PR solve?
Issue Number: close #68203
Problem Summary:
Flaky test
TestMainBackupLoopinbr/pkg/backupintermittently fails, so this PR stabilizes that path.What changed and how does it work?
Root Cause
Random mock response assignment could leave a live store with no responses, causing the mock sender and RunLoop to wait until timeout.
Fix
Deterministic round-robin assignment keeps both mock stores participating in every subcase and removes the invalid empty-live-store setup.
Verification
Spec:
br/pkg/backup :: TestMainBackupLooptidb.issue_scoped.v2BASELINE_ONLYGO_TEST_WITH_TAGSintest, deadlockbaseline_onlyObserved result:
Required flaky case was not skipped.
target_flaky passed.
build passed.
Gate checklist:
Commands:
go test -json -tags=intest,deadlock ./br/pkg/backup -run '^TestMainBackupLoop$' -count=1make buildCheck List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Fixes #68203
Summary by CodeRabbit