test: stabilize flaky TestCoprocessorOOMTiCase#69363
Conversation
📝 WalkthroughWalkthrough
ChangesCoprocessor OOM Test Refactor
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)
✏️ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/executor/executor_failpoint_test.go (1)
311-316: 🧹 Nitpick | 🔵 Trivial | 💤 Low valueConsider removing or using the
_curpkg_helper.The function is defined with a clear explanatory comment, but scanning the changed code shows it's never called. The
runTiCasecalls (lines 385, 387, 389) and the probe failpoint name (line 298) all use hardcoded full paths instead.If this helper is intended for future use, consider adding a comment explaining that. Otherwise, removing unused code improves maintainability.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/executor/executor_failpoint_test.go` around lines 311 - 316, The _curpkg_ helper function is defined but never called in the file, as the runTiCase calls and probe failpoint name all use hardcoded full paths. Either remove the _curpkg_ function entirely if it is not needed, or if it is intended for future use, add a comment documenting that intention. If the function should be actively used, refactor the hardcoded path strings in the runTiCase calls and failpoint name references to use the _curpkg_ helper instead.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pkg/executor/executor_failpoint_test.go`:
- Around line 311-316: The _curpkg_ helper function is defined but never called
in the file, as the runTiCase calls and probe failpoint name all use hardcoded
full paths. Either remove the _curpkg_ function entirely if it is not needed, or
if it is intended for future use, add a comment documenting that intention. If
the function should be actively used, refactor the hardcoded path strings in the
runTiCase calls and failpoint name references to use the _curpkg_ helper
instead.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 437cbe03-4dbb-44ed-8835-8ab365d2f043
📒 Files selected for processing (1)
pkg/executor/executor_failpoint_test.go
What problem does this PR solve?
Issue Number: close #68240
Problem Summary:
Flaky test
TestCoprocessorOOMTiCaseinpkg/executorintermittently fails, so this PR stabilizes that path.What changed and how does it work?
Root Cause
Test harness guard defect: the previous repair passed raw validation by skipping/narrowing execution instead of preserving the full test intent.
Fix
Raw builds now execute all SQL cases and assert no quota crossing without rewritten failpoints, while failpoint builds assert the restored timing hooks do cross the quota.
Verification
Spec:
pkg/executor :: TestCoprocessorOOMTiCasetidb.issue_scoped.v2BASELINE_ONLYGO_TEST_WITH_TAGSintest, deadlockbaseline_onlyObserved result:
Required flaky case was not skipped.
target_raw passed.
target_failpoint passed.
Gate checklist:
Commands:
go test -json -tags=intest,deadlock ./pkg/executor -run '^TestCoprocessorOOMTiCase$' -count=1./tools/check/failpoint-go-test.sh pkg/executor -run '^TestCoprocessorOOMTiCase$' -count=1Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Fixes #68240
Summary by CodeRabbit