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 2020/01/03 22:10:19 UTC

[GitHub] [zookeeper] HorizonNet commented on a change in pull request #1187: ZOOKEEPER-3414 sync api throws NoNodeException when path is non-existent

HorizonNet commented on a change in pull request #1187: ZOOKEEPER-3414 sync api throws NoNodeException when path is non-existent
URL: https://github.com/apache/zookeeper/pull/1187#discussion_r362977850
 
 

 ##########
 File path: zookeeper-server/src/test/java/org/apache/zookeeper/ZooKeeperTest.java
 ##########
 @@ -691,4 +691,19 @@ public void testSyncCommand() throws Exception {
         runCommandExpect(cmd, expected);
     }
 
+    @Test
+    public void testSyncCommandFailure() throws Exception {
+        final ZooKeeper zk = createClient();
+        SyncCommand cmd = new SyncCommand();
+        cmd.setZk(zk);
+        cmd.parse("sync /dddd".split(" "));
+        try {
+            runCommandExpect(cmd, new ArrayList<String>());
+            fail("Path doesn't exist so, command should fail.");
 
 Review comment:
   Better: `Command did not fail, even the path does not exist`

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