spring-data-gemfire
spring-data-gemfire copied to clipboard
Fix flaky tests in CollectionUtilsUnitTests
In org.springframework.data.gemfire.util.CollectionUtilsUnitTests, the tests iterableOfEnumeration() , iterableOfIterator() are all flaky due to the non-deterministic property of HashSet (please refer document). It stores value in non-determined order, so it is possible to report exception when invoking containsExactly(). I fixed by changing the HashSet to LinkedHashSet, which guarantees the order of value added into the set and eliminates the flakiness of these two tests.