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 ce11b2f1b9d..2b302785f66 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,11 @@ 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.assertEquals(resources.size(), _resourcesMap.get("TestCluster_0").size(), "Sizes are not equal"); + Assert.assertTrue(resources.containsAll(_resourcesMap.get("TestCluster_0")), "resources does not contain all " + + "elements from _resourcesMap"); + Assert.assertTrue(_resourcesMap.get("TestCluster_0").containsAll(resources), "_resourcesMap does not contain all " + + "elements from resources"); System.out.println("End test :" + TestHelper.getTestMethodName()); }