pkg/ddl/tests/tiflash: stabilize flaky TestTiFlashProgressAfterAvailable (#68122)#69032
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)
📝 WalkthroughWalkthroughThis PR addresses test flakiness in ChangesTiFlash Test Reliability Fixes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
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)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions 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 @@
## release-8.5 #69032 +/- ##
================================================
Coverage ? 56.5888%
================================================
Files ? 1843
Lines ? 685006
Branches ? 0
================================================
Hits ? 387637
Misses ? 268827
Partials ? 28542
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: GMHDBJD, wjhuang2016 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 |
[LGTM Timeline notifier]Timeline:
|
|
/retest |
This is an automated cherry-pick of #68122
What problem does this PR solve?
Issue Number: close #67420
Problem Summary:
Flaky test
TestTiFlashProgressAfterAvailableinpkg/ddl/tests/tiflashintermittently fails, so this PR stabilizes that path.What changed and how does it work?
Root Cause
the original flaky is still a teardown race where the mock TiFlash status endpoint could be closed before the DDL poller stopped, and this round’s finding was that removing the close entirely fixed the panic but leaked the mock server goroutines.
Fix
the necessary patch restores mock-server teardown after
Domain.Close()drains the DDL background loops, preserving the earliersession.CreateSessionAndSetIDvalidation-compatibility fix forTestTiFlashProgressAfterAvailable.Verification
Spec:
pkg/ddl/tests/tiflash :: TestTiFlashProgressAfterAvailabletidb.go_flaky.defaultBASELINE_ONLYbaseline_onlyObserved result:
Gate checklist:
Commands:
go test -json ./pkg/ddl/tests/tiflash -run '^TestTiFlashProgressAfterAvailable$' -count=1go test -json ./pkg/ddl/tests/tiflash -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 #67420
Summary by CodeRabbit