test: stabilize flaky TestNormalError#70054
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesSubscription test synchronization
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #70054 +/- ##
================================================
- Coverage 76.3266% 73.9378% -2.3889%
================================================
Files 2041 2058 +17
Lines 559579 578881 +19302
================================================
+ Hits 427108 428012 +904
- Misses 131570 150514 +18944
+ Partials 901 355 -546
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
PR: #70054 |
|
@flaky-claw: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RidRisR, YuJuncen The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: close #67741
Problem Summary:
Flaky test
TestNormalErrorinbr/pkg/streamhelperintermittently fails, so this PR stabilizes that path.What changed and how does it work?
Root Cause
waitPendingEventscould observe no immediate channel-length progress while listener goroutines still had pending flush events, soDrop()canceled the delivery path and the final merged checkpoint lagged behindcp.Fix
Waiting for
collectCheckpointSpans(t, sub, cp)preserves the original recovery assertion while removing the invalid timing assumption.Verification
Spec:
br/pkg/streamhelper :: TestNormalErrortidb.go_flaky.defaultBASELINE_ONLYGO_TEST_WITH_TAGSintest, deadlockbaseline_onlyObserved result:
Required flaky case was not skipped.
target_flaky_exact passed.
timing_about_to_send passed.
Gate checklist:
Commands:
go test -json -tags=intest,deadlock ./br/pkg/streamhelper -run '^TestNormalError$' -count=1GO_FAILPOINTS='github.com/pingcap/tidb/br/pkg/streamhelper/subscription.listenOver.aboutToSend=sleep("5ms")' ./tools/check/failpoint-go-test.sh br/pkg/streamhelper -run '^TestNormalError$' -count=1Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Fixes #67741
Summary by CodeRabbit