fix JSON flaky tests#3
Conversation
fa679c0 to
0ba7d4a
Compare
|
Just a few comments on the PR.
|
0ba7d4a to
0fefa84
Compare
|
I remember you had some PRs to add this dependency. If you opened a PR already, you can either push this to the existing PR or mention the existing one. Or if you haven't opened a PR with this dependency, ignore me. You can proceed to open a real PR. Once you open a real PR, please mark this tentative PR as |
|
Actually, I noticed someone else is using |
dedfff7 to
47e7033
Compare
|
@zzjas thanks for pointing that out, I was not aware of this! |
47e7033 to
6eddd48
Compare
|
Overall a good fix with very detailed descriptions in the PR, but I agree with kavvya97's opinion that maybe containing the long log messages in this description will annoy the developers, thus try to replace it with brief summary and let them run the commands to get the logs if they want. |
Fixes apache#15198, apache#15199, apache#15200, apache#15201, apache#15202, apache#15204
These flaky tests have been found using the NonDex Plugin.
Description
Fixes flaky test org.apache.druid.java.util.emitter.core.ParametrizedUriEmitterTest#testEmitterWithMultipleFeeds
ID: apache#15198
Problem:
This test checks the Equality of two maps, containing the same keys (strings) and values (strings). These values are JSON-String. JSON strings are not unique – they are considered equal if they contain the same elements without taking care of the order of the elements on the same level. The current assertion leads to a flaky test.
Solution
To fix this, the strings are getting parsed using the Jackson library and compared to remove the flakiness.
To reproduce run
Fixes flaky tests org.apache.druid.java.util.emitter.core.EmitterTest#testSanityWithGeneralizedCreation , test org.apache.druid.java.util.emitter.core.EmitterTest#testSanity , org.apache.druid.java.util.emitter.core.EmitterTest#testGzipContentEncoding
ID: apache#15199, apache#15200, apache#15201
Problem:
These tests check 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.
Solution
To fix this, the strings are getting parsed using the Jackson library and compared to remove the flakiness.
To reproduce run
Fixes flaky test org.apache.druid.java.util.emitter.core.EmitterTest#testBatchSplitting
ID: apache#15202
Problem:
This test fails on EmitterTest.java:541, but the actual error is the JSON assertion in the GoHandler again. 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.
Solution
To fix this, the strings are getting parsed using the Jackson library and compared to remove the flakiness.
To reproduce run
Fixes flaky test org.apache.druid.java.util.emitter.core.EmitterTest#testBasicAuthenticationAndNewlineSeparating
ID: apache#15204
Problem:
This test fails in a later line, but the actual error is the JSON assertion in the GoHandler again. 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.
Solution
To fix this, the strings are getting parsed using the Jackson library and compared to remove the flakiness.
To reproduce run
Key changed/added classes in this PR
org.apache.druid.java.util.emitter.core.ParametrizedUriEmitterTestorg.apache.druid.java.util.emitter.core.EmitterTestThis PR has: