diff --git a/helix-rest/src/test/java/org/apache/helix/rest/server/TestResourceAccessor.java b/helix-rest/src/test/java/org/apache/helix/rest/server/TestResourceAccessor.java index ce11b2f1b9..32002b5539 100644 --- a/helix-rest/src/test/java/org/apache/helix/rest/server/TestResourceAccessor.java +++ b/helix-rest/src/test/java/org/apache/helix/rest/server/TestResourceAccessor.java @@ -75,8 +75,10 @@ public void testGetResources() throws IOException { Set 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()); }