Randgalt commented on a change in pull request #334: [CURATOR-549] Support 
ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r393393447
 
 

 ##########
 File path: 
curator-framework/src/test/java/org/apache/curator/framework/imps/TestWatchesBuilder.java
 ##########
 @@ -611,6 +614,56 @@ public void pathAddedForGuaranteedOperation(
         }
     }
 
+    @Test(groups = CuratorTestBase.zk36Group)
+    public void testPersistentRecursiveWatch() throws Exception
+    {
+        try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+        {
+            client.start();
+            client.blockUntilConnected();
+
+            CountDownLatch latch = new CountDownLatch(5);
+            Watcher watcher = event -> latch.countDown();
+            
client.watchers().add().withMode(AddWatchMode.PERSISTENT_RECURSIVE).usingWatcher(watcher).forPath("/test");
+
+            client.create().forPath("/test");
 
 Review comment:
   I was thinking it isn't necessary to test functionality that's already 
tested in ZK itself. But, this is a good point. I'll add some more tests.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to