This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 72c1016  Fixing Zookeeper test that was previously removed
72c1016 is described below

commit 72c10160a2be527efcdd18f69dde69da5f4dc9a0
Author: Colm O hEigeartaigh <cohei...@apache.org>
AuthorDate: Tue Jun 25 12:00:38 2019 +0100

    Fixing Zookeeper test that was previously removed
---
 .../zookeeper/operations/CreateOperationTest.java    | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git 
a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/operations/CreateOperationTest.java
 
b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/operations/CreateOperationTest.java
index e1bc0ef..a0a3265 100644
--- 
a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/operations/CreateOperationTest.java
+++ 
b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/operations/CreateOperationTest.java
@@ -16,9 +16,15 @@
  */
 package org.apache.camel.component.zookeeper.operations;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.camel.component.zookeeper.ZooKeeperTestSupport;
 import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.ZooDefs.Ids;
+import org.apache.zookeeper.ZooDefs.Perms;
 import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.data.ACL;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -86,4 +92,18 @@ public class CreateOperationTest extends 
ZooKeeperTestSupport {
         verifyNodeContainsData(out, testPayloadBytes);
     }
 
+    @Test
+    public void createNodeWithSpecificAccess() throws Exception {
+        CreateOperation create = new CreateOperation(connection, "/four");
+        create.setData(testPayload.getBytes());
+        List<ACL> perms = new ArrayList<>();
+        perms.add(new ACL(Perms.CREATE, Ids.ANYONE_ID_UNSAFE));
+        perms.add(new ACL(Perms.READ, Ids.ANYONE_ID_UNSAFE));
+        create.setPermissions(perms);
+
+        OperationResult<String> result = create.get();
+        assertEquals("/four", result.getResult());
+
+        verifyAccessControlList("/four", perms);
+    }
 }

Reply via email to