Open
Conversation
ac7d6a4 to
c56e856
Compare
38ede59 to
73929cb
Compare
3f4261e to
9d5f403
Compare
…st and FlattenSpecParquetReaderTest Co-authored-by: lakkidi2 <lakkidi2@fa23-cs527-035.cs.illinois.edu> Co-authored-by: lxb007981 <lxb007981@hotmail.com> Co-authored-by: Prathyush Reddy Lakkidi <prathyushreddylakkidi@Prathyushs-MacBook-Air.local>
…ns, indexing-service modules
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.
I found some flaky tests using the NonDex Plugin for maven in the
processingmodule.Description
Fixed the following flaky tests:
Problem:
The above mentioned tests have been reported as flaky (tests assuming deterministic implementation of a non-deterministic specification ) when ran against the NonDex tool.
The tests contain assertions that compare strings created from JSON objects(Assertion 1 and lists created from HashSets & Assertion 2).
However, HashSet does not guarantee the ordering of elements and thus resulting in these flaky tests that assume deterministic implementation of HashSet. Also, It checks for a specific ordering of elements in a JSON string. JSON strings are equal even if the ordering of the elements in the JSON strings are not equal. This results in flakiness as the Jackson ObjectMapper does not guarantee consistent ordering of the JSON keys.
Thus, when the NonDex tool shuffles the HashSet elements and the JSON keys, it results in test failures like:
To reproduce run:
Fix:
For the test
org.apache.druid.segment.virtual.ExpressionVirtualColumnTest#testRequiredColumns, first convert the arraylists to hashSets and then compare the 2 HashSets using assertEquals().For all other tests in
NestedDataColumnSupplierTestandNestedDataColumnSupplierV4Testclasses, first create the JSON node trees and then compare the two trees using assertEquals().Key changed/added classes in this PR
org.apache.druid.segment.nested.NestedDataColumnSupplierV4Testorg.apache.druid.segment.nested.NestedDataColumnSupplierTestorg.apache.druid.segment.virtual.ExpressionVirtualColumnTestThis PR has: