fix testGroupByLevelWithSliding2Series2Devices3Regions#16615
Open
kabo87777 wants to merge 1 commit intoapache:masterfrom
Open
fix testGroupByLevelWithSliding2Series2Devices3Regions#16615kabo87777 wants to merge 1 commit intoapache:masterfrom
kabo87777 wants to merge 1 commit intoapache:masterfrom
Conversation
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.
Fix Non-Deterministic Behavior in AggregationDistributionTest.testGroupByLevelWithSliding2Series2Devices3Regions
Problem
The test
testGroupByLevelWithSliding2Series2Devices3Regionswas failing non-deterministically under NonDex with a 60% failure rate (3 out of 5 runs) due to order-dependent fragment access and rigid assumptions about node positions and descriptor patterns.Way to Reproduce
Root Cause
The test made multiple order-dependent assumptions about a complex plan with 3 fragments:
get(0),get(1),get(2))GroupByLevelNodeandSlidingWindowAggregationNodeare at specific child positionsWhen NonDex shuffled collection iteration order, fragments appeared in different orders with varying structures, causing
ClassCastExceptionor assertion failures even though the query plan was semantically correct.Solution
Made the test order-independent by counting node types across all fragments instead of verifying specific positions and descriptor patterns:
Changed from Position-Based to Count-Based Verification
Before (Order-Dependent):
After (Order-Independent):
Key Improvements:
>= 2instead of exact equality to accommodate plan variationscountNodesOfType()to search entire tree at any depthVerification
Tested with 30 NonDex runs - 0 failures (100% success rate):
mvn edu.illinois:nondex-maven-plugin:2.1.1:nondex \ -Dtest=AggregationDistributionTest#testGroupByLevelWithSliding2Series2Devices3Regions \ -DnondexRuns=30 # Result: 0 failuresKey Changed Classes
testGroupByLevelWithSliding2Series2Devices3Regionsto use order-independent verificationcountNodesOfType()helper method