zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] arshadmohammad commented on a change in pull request #1080: ZOOKEEPER-3496: Transaction larger than jute.maxbuffer makes ZooKeeper service unavailable
Date Fri, 06 Sep 2019 17:38:13 GMT
arshadmohammad commented on a change in pull request #1080: ZOOKEEPER-3496: Transaction larger
than jute.maxbuffer makes ZooKeeper service unavailable
URL: https://github.com/apache/zookeeper/pull/1080#discussion_r321839124
 
 

 ##########
 File path: zookeeper-server/src/test/java/org/apache/zookeeper/JuteMaxBufferTest.java
 ##########
 @@ -0,0 +1,146 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zookeeper;
+
+import static org.apache.zookeeper.test.ClientBase.CONNECTION_TIMEOUT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.zookeeper.ZooDefs.Ids;
+import org.apache.zookeeper.common.ZKConfig;
+import org.apache.zookeeper.server.ZKDatabase;
+import org.apache.zookeeper.server.persistence.FileTxnSnapLog;
+import org.apache.zookeeper.server.quorum.QuorumPeerTestBase;
+import org.apache.zookeeper.test.ClientBase;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class JuteMaxBufferTest extends QuorumPeerTestBase {
+    private MainThread mt;
+
+    @Before
+    public void setup() throws Exception {
+        // Request size for 100 nodes in this test class is 6197 bytes
+        System.setProperty(ZKConfig.JUTE_MAXBUFFER, Integer.toString(6197));
 
 Review comment:
   Thanks @eolivelli for your suggestions. I had run this test in ant build setup and it was
working fine. I think in ant it was forking new jvm for every test class. that is why it might
have passed. 
   But yes , if in one jvm multiple tests are running, value assigned to org.apache.jute.BinaryInputArchive#maxBuffer
can not be changed from this test case.

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

Mime
View raw message