mirror of https://github.com/apache/activemq.git
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
This commit is contained in:
parent
9ee7bbb0af
commit
5ebe71cec9
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
2
pom.xml
2
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>
|
||||
|
|
Loading…
Reference in New Issue