Przeglądaj źródła

ZOOKEEPER-1560 Zookeeper client hangs on creation of large nodes. Added missing test. (Skye Wanderman-Milne via phunt)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1404288 13f79535-47bb-0310-9956-ffa450edef68
Patrick D. Hunt 12 lat temu
rodzic
commit
71adac9671

+ 16 - 0
src/java/test/org/apache/zookeeper/test/ClientTest.java

@@ -521,6 +521,22 @@ public class ClientTest extends ClientBase {
 
     }
 
+    @Test
+    public void testLargeNodeData() throws Exception {
+        ZooKeeper zk= null;
+        String queue_handle = "/large";
+        try {
+            zk = createClient();
+
+            zk.create(queue_handle, new byte[500000], Ids.OPEN_ACL_UNSAFE,
+                    CreateMode.PERSISTENT);
+        } finally {
+            if (zk != null) {
+                zk.close();
+            }
+        }
+
+    }
 
     private void verifyCreateFails(String path, ZooKeeper zk) throws Exception {
         try {