atlas
atlas copied to clipboard
Propose a fix to potential flaky test under testGenerateSearchWeightString
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!
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)