test: stabilize flaky TestIssue29282#69881
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
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)
📝 WalkthroughWalkthroughTestIssue29282 replaces goroutine and timeout-based lock blocking validation with explicit ChangesLock test validation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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)level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: context deadline exceeded" 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 #69881 +/- ##
================================================
- Coverage 76.3207% 75.5704% -0.7503%
================================================
Files 2041 2084 +43
Lines 559975 582360 +22385
================================================
+ Hits 427377 440092 +12715
- Misses 131697 140155 +8458
- Partials 901 2113 +1212
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
What problem does this PR solve?
Issue Number: close #69824
Problem Summary:
Flaky test
TestIssue29282inpkg/ddlintermittently fails, so this PR stabilizes that path.What changed and how does it work?
Root Cause
Fixed sleeps let cleanup or cancellation race a still-running background SELECT FOR UPDATE in TestIssue29282.
Fix
NOWAIT verifies the same row-lock behavior before and after rollback without depending on goroutine scheduling.
Verification
Spec:
pkg/ddl :: TestIssue29282tidb.go_flaky.defaultBASELINE_ONLYGO_TEST_WITH_TAGSintest, deadlockbaseline_onlyObserved result:
Required flaky case was not skipped.
target_flaky passed.
build passed.
lint passed.
Gate checklist:
Commands:
go test -json -tags=intest,deadlock ./pkg/ddl -run '^TestIssue29282$' -count=1make buildmake lintCheck List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Fixes #69824
Summary by CodeRabbit