zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anmolnar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #466: ZOOKEEPER-2940. Deal with maxbuffer as it relat...
Date Tue, 17 Apr 2018 19:19:08 GMT
Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/466#discussion_r182196539
  
    --- Diff: src/java/test/org/apache/zookeeper/server/NIOServerCnxnTest.java ---
    @@ -68,5 +74,19 @@ public void testOperationsAfterCnxnClose() throws IOException,
             } finally {
                 zk.close();
             }
    +
    +    }
    +
    +    @Test
    +    public void testClientResponseStatsUpdate() throws IOException, InterruptedException,
KeeperException {
    +        try (ZooKeeper zk = createClient()) {
    +            ProposalStats stats = serverFactory.getZooKeeperServer().serverStats().getClientResponseStats();
    +            assertEquals("", -1, stats.getLast());
    +
    +            zk.create("/a", "test".getBytes(), Ids.OPEN_ACL_UNSAFE,
    +                    CreateMode.PERSISTENT);
    +
    +            assertThat(stats.getLast(), greaterThan(0));
    --- End diff --
    
    +1 for assert messages
    Did you mean -1 as the magic number which means that stat has not been updated yet...?


---

Mime
View raw message