Fix Flaky Tests#205
Conversation
|
@qz0610 Please make your tool write its files to the |
|
Hello @qz0610 Please rebase on git master and explain how this failure went away: The change is the addition of a JUnit assertion. Now, there is a new error, comparing How is this possible when we get green builds?
TY |
|
Hi @garydgregory, thank you very much for the review and feedback. For these two failures, the order of elements in Hashset is not always guaranteed, when each time it's passed to In this case getValue() could not retrieve |
Description
Eleven tests were found to be flaky using nondex:
The flakiness can be reproduced by running:
flaky tests failures:
These eleven tests have the same root cause for flakiness: their passing depends on the order of elements stored in the set returned by
getSet()inTestBeanclass, which is not deterministic with HashSet implementation.Proposed Fix
This pr proposes a simple fix by replacing HashSet with LinkedHashSet in
TestBean. After this fix, all eleven tests now pass consistently.