[Flaky Test] Fix PinotCustomDependencyVersionRuleTest mock setup#18059
Open
xiangfu0 wants to merge 2 commits intoapache:masterfrom
Open
[Flaky Test] Fix PinotCustomDependencyVersionRuleTest mock setup#18059xiangfu0 wants to merge 2 commits intoapache:masterfrom
xiangfu0 wants to merge 2 commits intoapache:masterfrom
Conversation
PinotCustomDependencyVersionRuleTest#setUp had 4 failures in the weekly CI digest (2026-03-22 to 2026-03-28). Root cause: All test methods mocked _session.getTopLevelProject() to return the same _project object used as the current project. When both root and current project share the same basedir, path relativization produces an empty path, causing inconsistent behavior in the dependency version checker. Fix: Create separate mock objects for root and current projects with distinct absolute paths (/root/pinot vs /root/pinot/<module>) so relativization correctly extracts the module name. Applied consistently across all 4 affected test methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18059 +/- ##
============================================
+ Coverage 63.24% 63.34% +0.10%
- Complexity 1481 1540 +59
============================================
Files 3191 3200 +9
Lines 192593 194221 +1628
Branches 29537 29929 +392
============================================
+ Hits 121797 123030 +1233
- Misses 61239 61535 +296
- Partials 9557 9656 +99
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Move the skipModules check before verifyNoHardcodedVersions so that skipped modules (e.g. pinot-plugins) are exempted before any version validation runs. Previously the hardcoded-version check fired first, causing testExecuteWithSkippedModule to fail. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PinotCustomDependencyVersionRuleTest#setUpwhich had 4 failures in the weekly CI digest (2026-03-22 to 2026-03-28)_session.getTopLevelProject()to return the same_projectobject, breaking path relativization when root and current project share the same basedir/root/pinot) and current project (/root/pinot/<module>) soPath.relativize()correctly extracts the module nameTest plan
PinotCustomDependencyVersionRuleTestlocally to verify all 4 tests pass🤖 Generated with Claude Code