liran2000 commented on a change in pull request #391:
URL: https://github.com/apache/curator/pull/391#discussion_r669356835



##########
File path: 
curator-framework/src/test/java/org/apache/curator/framework/imps/TestFramework.java
##########
@@ -1073,7 +1080,41 @@ public void testCreateModes() throws Exception
         }
         finally
         {
-            CloseableUtils.closeQuietly(client);
+               CloseableUtils.closeQuietly(client);
+        }
+    }
+    
+    @Test
+    public void testConfigurableZookeeper() throws Exception
+    {
+       CuratorFramework client = null;
+        try
+        {
+               ZKClientConfig zkClientConfig = new ZKClientConfig();
+               String zookeeperRequestTimeout = "30000";
+               
zkClientConfig.setProperty(ZKClientConfig.ZOOKEEPER_REQUEST_TIMEOUT, 
zookeeperRequestTimeout);
+               client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), 30000, 30000, new 
RetryOneTime(1), zkClientConfig);
+            client.start();
+               
+            byte[] writtenBytes = {1, 2, 3};
+            client.create().forPath("/test", writtenBytes);
+
+            byte[] readBytes = client.getData().forPath("/test");
+            assertArrayEquals(writtenBytes, readBytes);
+            assertEquals(zookeeperRequestTimeout, 
client.getZookeeperClient().getZooKeeper().getClientConfig().getProperty(ZKClientConfig.ZOOKEEPER_REQUEST_TIMEOUT));
+            
+        } catch (NoSuchMethodError e) {
+                       log.debug("NoSuchMethodError: ", e);

Review comment:
       Sure, done.
   BTW, at my IDE this formatting, formatting was fine, depends on IDE config, 
I will notice it.
   




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to