From fb62989e5e704d24f7af804722b6549f55b967a5 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Thu, 15 Nov 2012 16:34:02 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-4108 - fix unit test regression, QueueMasterSlaveTest, related to https://issues.apache.org/jira/browse/AMQ-4005 and the dual impl of broker service aware. the auto created locker was not getting its broker service init. flakyness in test related to exponential backoff tool long for reconnect git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1409871 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/broker/ft/QueueMasterSlaveTest.java | 4 +++- .../activemq/store/kahadb/KahaDBPersistenceAdapter.java | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java index efdd9e6593..5ae54e4c50 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java @@ -47,7 +47,7 @@ public class QueueMasterSlaveTest extends JmsTopicSendReceiveWithTwoConnectionsT protected CountDownLatch slaveStarted = new CountDownLatch(1); protected int inflightMessageCount; protected int failureCount = 50; - protected String uriString = "failover://(tcp://localhost:62001,tcp://localhost:62002)?randomize=false"; + protected String uriString = "failover://(tcp://localhost:62001,tcp://localhost:62002)?randomize=false&useExponentialBackOff=false"; protected void setUp() throws Exception { setMaxTestTime(TimeUnit.MINUTES.toMillis(10)); @@ -140,7 +140,9 @@ public class QueueMasterSlaveTest extends JmsTopicSendReceiveWithTwoConnectionsT master.stop(); assertTrue("slave started", slaveStarted.await(15, TimeUnit.SECONDS)); + LOG.info("slave started"); Message advisoryMessage = advConsumer.receive(5000); + LOG.info("received " + advisoryMessage); assertNotNull("Didn't received advisory", advisoryMessage); } diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java index 2acdb0ee72..65756e73e2 100644 --- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java +++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java @@ -429,7 +429,9 @@ public class KahaDBPersistenceAdapter extends LockableServiceSupport implements letter.setCheckForCorruptJournalFiles(checkForCorruptJournalFiles); } + @Override public void setBrokerService(BrokerService brokerService) { + super.setBrokerService(brokerService); letter.setBrokerService(brokerService); }