You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/12/02 02:38:14 UTC

[GitHub] [zookeeper] TisonKun commented on a change in pull request #1095: ZOOKEEPER-837: Eliminate cycle dependency between ClientCnxn and ZooKeeper

TisonKun commented on a change in pull request #1095: ZOOKEEPER-837: Eliminate cycle dependency between ClientCnxn and ZooKeeper
URL: https://github.com/apache/zookeeper/pull/1095#discussion_r352400535
 
 

 ##########
 File path: zookeeper-server/src/test/java/org/apache/zookeeper/server/NettyServerCnxnTest.java
 ##########
 @@ -85,10 +85,9 @@ public void tearDown() throws Exception {
     public void testSendCloseSession() throws Exception {
         assertTrue("Didn't instantiate ServerCnxnFactory with NettyServerCnxnFactory!", serverFactory instanceof NettyServerCnxnFactory);
 
-        final ZooKeeper zk = createClient();
-        final ZooKeeperServer zkServer = serverFactory.getZooKeeperServer();
-        final String path = "/a";
-        try {
+        try (ZooKeeper zk = createClient()) {
+            final ZooKeeperServer zkServer = serverFactory.getZooKeeperServer();
 
 Review comment:
   Sorry for that. I will keep in mind.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services