Fixed flaky tests in FlattenSpecParquetReaderTest.java with ObjectMapper#3
Fixed flaky tests in FlattenSpecParquetReaderTest.java with ObjectMapper#3
Conversation
|
In the release note, you can probably reword it to talk about just addressing the flakiness in the tests and not mention nondex. If space permits, you can probably add a failure stacktrace from one of the nondex runs. Apart from that, I feel the justification for leveraging additional dependencies is adequate. |
|
Could you attach more details to the cause and issue, the links to the code or snippets would also work. |
|
Hello casey, |
2ef3365 to
d044086
Compare
Description
Fixed flaky tests in FlattenSpecParquetReaderTest.java with ObjectMapper
druid/extensions-core/parquet-extensions/src/test/java/org/apache/druid/data/input/parquet/FlattenSpecParquetReaderTest.java
Line 42 in ad32f84
Test:
testFlat1NoFlattenSpec,testFlat1Autodiscover,testFlat1Flatten,testFlat1FlattenSelectListItem,testNested1NoFlattenSpec,testNested1Autodiscover,testNested1Flatten,testNested1FlattenSelectListItemSteps to Reproduce:
The following is an example error message from
testFlat1FlattenReason of flakiness:
These tests check the equality of two JSON strings. The data reading methods used
createReader()in those tests do not retrieve data in a consistent order, which can possibly lead to different JSON representations of the same data during test runs.Changes:
fasterxml.jacksonpackage, and changed from using standard assertion methodAssertto usingJSONNodeandObjectMapper, which parse two JSON strings and convert them to a tree structure and each node in the trees are compared. Thus, the order of the elements in JSON strings is deterministic and the test passes.Release note
Fixed:
FlattenSpecParquetReaderTest.javatests no longer fail when running with the NonDex tool.This PR has: