atlas icon indicating copy to clipboard operation
atlas copied to clipboard

Propose a fix to potential flaky test under testGenerateSearchWeightString

Open SpiceOwlf opened this issue 3 years ago • 1 comments

Hi, I detect a flaky test under testGenerateSearchWeightString using NonDex(https://github.com/TestingResearchIllinois/NonDex). The problem was caused by the non-deterministic behavior of HashMap, and I used LinkedHashMap to solve that. Please let me know if I need to follow some process to propose the fix, or you want to discuss more about this PR. Thanks!

SpiceOwlf avatar Nov 15 '21 03:11 SpiceOwlf

Here is the brief report that illustrates the problem:

<<< FAILURE! - in org.apache.atlas.repository.graphdb.janus.AtlasJanusGraphIndexClientTest [ERROR] org.apache.atlas.repository.graphdb.janus.AtlasJanusGraphIndexClientTest.testGenerateSearchWeightString Time elapsed: 0.182 s <<< FAILURE! java.lang.AssertionError: expected [ one^10 two^1 three^15] but found [ three^15 two^1 one^10] at org.apache.atlas.repository.graphdb.janus.AtlasJanusGraphIndexClientTest.testGenerateSearchWeightString(AtlasJanusGraphIndexClientTest.java:120)

SpiceOwlf avatar Nov 15 '21 03:11 SpiceOwlf