jiajunwang commented on a change in pull request #845: Async write operation 
should not throw Exception for serializing error
URL: https://github.com/apache/helix/pull/845#discussion_r386747120
 
 

 ##########
 File path: 
helix-core/src/test/java/org/apache/helix/manager/zk/TestRawZkClient.java
 ##########
 @@ -745,4 +749,65 @@ public void testWaitForEstablishedSession() {
     // Recover zk server for later tests.
     _zkServer.start();
   }
+
+  @Test
+  public void testAsyncWriteOperations() {
+    ZkClient zkClient = new ZkClient(ZK_ADDR);
+    String originSizeLimit =
+        
System.getProperty(ZkSystemPropertyKeys.ZK_SERIALIZER_ZNRECORD_WRITE_SIZE_LIMIT_BYTES);
+    
System.setProperty(ZkSystemPropertyKeys.ZK_SERIALIZER_ZNRECORD_WRITE_SIZE_LIMIT_BYTES,
 "2000");
+    try {
+      zkClient.setZkSerializer(new ZNRecordSerializer());
+
+      ZNRecord oversizeZNRecord = new ZNRecord("Oversize");
+      StringBuilder sb = new StringBuilder(1204);
 
 Review comment:
   This is to leave some buffer space. 1024 will fail due to the additional 
metadata info in the node.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to