Skip to content

Commit

Permalink
Fix flaky test (#2643) (#2664)
Browse files Browse the repository at this point in the history
in org.apache.helix.rest.server.
TestResourceAccessor#testGetResources

Co-authored-by: simonh5 <[email protected]>
  • Loading branch information
hofi1 and simonh5 authored Feb 27, 2024
1 parent 448e7a0 commit 1eea253
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 1eea253

Please sign in to comment.