activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject [2/2] activemq git commit: improve reliability of leveldb replication test org.apache.activemq.leveldb.test.ReplicatedLevelDBBrokerTest - ZOOKEEPER-1751 fixed in 3.4.6 is releated, also the default 2s session expiry with a 500ms tick seems to be problema
Date Mon, 05 Jan 2015 21:01:50 GMT
improve reliability of leveldb replication test org.apache.activemq.leveldb.test.ReplicatedLevelDBBrokerTest
- ZOOKEEPER-1751 fixed in 3.4.6 is releated, also the default 2s session expiry with a 500ms
tick seems to be problematic with porpotional ping intervals. With 3.4.6 random client session
expiry due to ping timeouts are avoided but unexpected server side expiry still ocurrs due
to missing pings. Upping the session expiry to 15s avoids the client - server mismatch in
session connection cleanup


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/5ebe71ce
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/5ebe71ce
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/5ebe71ce

Branch: refs/heads/trunk
Commit: 5ebe71cec9ec48622914f1140ced19e9f307d756
Parents: 9ee7bbb
Author: gtully <gary.tully@gmail.com>
Authored: Mon Jan 5 20:30:29 2015 +0000
Committer: gtully <gary.tully@gmail.com>
Committed: Mon Jan 5 21:00:45 2015 +0000

----------------------------------------------------------------------
 .../apache/activemq/leveldb/test/MasterLevelDBStoreTest.java   | 2 +-
 .../activemq/leveldb/test/ReplicatedLevelDBBrokerTest.java     | 6 ++++++
 activemq-leveldb-store/src/test/resources/log4j.properties     | 3 ++-
 pom.xml                                                        | 2 +-
 4 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/5ebe71ce/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/MasterLevelDBStoreTest.java
----------------------------------------------------------------------
diff --git a/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/MasterLevelDBStoreTest.java
b/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/MasterLevelDBStoreTest.java
index b639902..645da02 100644
--- a/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/MasterLevelDBStoreTest.java
+++ b/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/MasterLevelDBStoreTest.java
@@ -95,7 +95,7 @@ public class MasterLevelDBStoreTest {
     public void stop() throws Exception {
         if (store.isStarted()) {
             store.stop();
+            FileUtils.deleteDirectory(store.directory());
         }
-        FileUtils.deleteDirectory(store.directory());
     }
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/5ebe71ce/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ReplicatedLevelDBBrokerTest.java
----------------------------------------------------------------------
diff --git a/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ReplicatedLevelDBBrokerTest.java
b/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ReplicatedLevelDBBrokerTest.java
index 7a38315..3514930 100644
--- a/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ReplicatedLevelDBBrokerTest.java
+++ b/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ReplicatedLevelDBBrokerTest.java
@@ -43,6 +43,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.commons.io.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 import static org.junit.Assert.*;
 
@@ -51,6 +54,7 @@ import static org.junit.Assert.*;
  */
 public class ReplicatedLevelDBBrokerTest extends ZooKeeperTestSupport {
 
+    protected static final Logger LOG = LoggerFactory.getLogger(ReplicatedLevelDBBrokerTest.class);
     final SynchronousQueue<BrokerService> masterQueue = new SynchronousQueue<BrokerService>();
     ArrayList<BrokerService> brokers = new ArrayList<BrokerService>();
 
@@ -70,6 +74,7 @@ public class ReplicatedLevelDBBrokerTest extends ZooKeeperTestSupport {
     @Test(timeout = 1000*60*10)
     public void testAMQ4837viaJMX() throws Throwable {
         for (int i = 0; i < 2; i++) {
+            LOG.info("testAMQ4837viaJMX - Iteration: " + i);
             resetDataDirs();
             testAMQ4837(true);
             stopBrokers();
@@ -442,6 +447,7 @@ public class ReplicatedLevelDBBrokerTest extends ZooKeeperTestSupport
{
         store.setContainer(id);
         store.setReplicas(3);
         store.setZkAddress("localhost:" + connector.getLocalPort());
+        store.setZkSessionTmeout("15s");
         store.setHostname("localhost");
         store.setBind("tcp://0.0.0.0:0");
         return store;

http://git-wip-us.apache.org/repos/asf/activemq/blob/5ebe71ce/activemq-leveldb-store/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/activemq-leveldb-store/src/test/resources/log4j.properties b/activemq-leveldb-store/src/test/resources/log4j.properties
index 661669a..06743dc 100755
--- a/activemq-leveldb-store/src/test/resources/log4j.properties
+++ b/activemq-leveldb-store/src/test/resources/log4j.properties
@@ -21,11 +21,12 @@
 log4j.rootLogger=INFO, console, file
 log4j.logger.org.apache.activemq=INFO
 log4j.logger.org.apache.activemq.leveldb=DEBUG
+log4j.logger.org.apache.zookeeper=DEBUG
 
 # Console will only display warnnings
 log4j.appender.console=org.apache.log4j.ConsoleAppender
 log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%-5p | %t | %m%n
+log4j.appender.console.layout.ConversionPattern=%d | %-5p | %t | %m%n
 log4j.appender.console.threshold=DEBUG
 
 # File appender will contain all info messages

http://git-wip-us.apache.org/repos/asf/activemq/blob/5ebe71ce/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 085ae8c..dca93f8 100755
--- a/pom.xml
+++ b/pom.xml
@@ -100,7 +100,7 @@
     <p2psockets-version>1.1.2</p2psockets-version>
     <paho-version>0.4.0</paho-version>
     <linkedin-zookeeper-version>1.4.0</linkedin-zookeeper-version>
-    <zookeeper-version>3.4.5</zookeeper-version>
+    <zookeeper-version>3.4.6</zookeeper-version>
     <qpid-proton-version>0.8</qpid-proton-version>
     <qpid-jms-version>0.30</qpid-jms-version>
     <regexp-version>1.3</regexp-version>


Mime
View raw message