Skip to content

Commit

Permalink
Fix flaky test (#2643)
Browse files Browse the repository at this point in the history
in org.apache.helix.rest.server.
TestResourceAccessor#testGetResources
  • Loading branch information
simonh5 committed Oct 14, 2023
1 parent 6241bcb commit a5d25cf
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ public void testGetResources() throws IOException {

Set<String> resources = OBJECT_MAPPER.readValue(idealStates,
OBJECT_MAPPER.getTypeFactory().constructCollectionType(Set.class, String.class));
Assert.assertEquals(resources, _resourcesMap.get("TestCluster_0"), "Resources from response: "
+ resources + " vs clusters actually: " + _resourcesMap.get("TestCluster_0"));
Assert.assertTrue(resources.size() == _resourcesMap.get("TestCluster_0").size()
&& resources.containsAll(_resourcesMap.get("TestCluster_0"))
&& _resourcesMap.get("TestCluster_0").containsAll(resources),
"Sets are not equal. Resources from response: " + resources + " vs clusters actually: " + _resourcesMap.get("TestCluster_0"));
System.out.println("End test :" + TestHelper.getTestMethodName());
}

Expand Down

0 comments on commit a5d25cf

Please sign in to comment.