diff --git a/src/test/java/net/spy/memcached/ProtocolBaseCase.java b/src/test/java/net/spy/memcached/ProtocolBaseCase.java index edc44d0af..4b75d1647 100644 --- a/src/test/java/net/spy/memcached/ProtocolBaseCase.java +++ b/src/test/java/net/spy/memcached/ProtocolBaseCase.java @@ -53,7 +53,7 @@ public void testAssertions() { public void testGetStats() throws Exception { Map> stats = client.getStats(); System.out.println("Stats: " + stats); - assertEquals(1, stats.size()); + assertEquals(client.getAllNodes().size(), stats.size()); Map oneStat = stats.values().iterator().next(); assertTrue(oneStat.containsKey("total_items")); } @@ -64,7 +64,7 @@ public void testGetStatsSlabs() throws Exception { client.set("slabinitializer", 0, "hi"); Map> stats = client.getStats("slabs"); System.out.println("Stats: " + stats); - assertEquals(1, stats.size()); + assertEquals(client.getAllNodes().size(), stats.size()); Map oneStat = stats.values().iterator().next(); assertTrue(oneStat.containsKey("0:chunk_size")); } @@ -79,7 +79,7 @@ public void testGetStatsSizes() throws Exception { client.set("sizeinitializer", 0, "hi"); Map> stats = client.getStats("sizes"); System.out.println("Stats: " + stats); - assertEquals(1, stats.size()); + assertEquals(client.getAllNodes().size(), stats.size()); Map oneStat = stats.values().iterator().next(); assertEquals("1", oneStat.get("96")); } @@ -91,7 +91,7 @@ public void testGetStatsCacheDump() throws Exception { Map> stats = client.getStats("cachedump 0 10000"); System.out.println("Stats: " + stats); - assertEquals(1, stats.size()); + assertEquals(client.getAllNodes().size(), stats.size()); Map oneStat = stats.values().iterator().next(); String val = oneStat.get("dumpinitializer"); assertTrue(val + "doesn't match", val.matches("\\[acctime=\\d+, exptime=\\d+\\]"));