[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16441999#comment-16441999
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2940:
-------------------------------------------

Github user rakeshadr commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/466#discussion_r182325325
  
    --- 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 --
    
    please add comments about the expectations like, 
    assertEquals("stat should be initialized with -1", -1, stats.getLast());  
or a better message:)
    
    that will help easy test case maintenance.
    b) greaterThan(0) , similarly good to add a message explaining why 0?


> Deal with maxbuffer as it relates to large requests from clients
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2940
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2940
>             Project: ZooKeeper
>          Issue Type: Sub-task
>          Components: jute, server
>            Reporter: Andor Molnar
>            Assignee: Andor Molnar
>            Priority: Major
>             Fix For: 3.5.4, 3.6.0
>
>
> Monitor real-time Jute buffer usage as it relates to large requests from 
> clients.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to