activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject git commit: [minor] Use MemoryPersistenceAdapter for testing when choice of persistence adapter is indifferent
Date Mon, 10 Mar 2014 15:00:37 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk d793db444 -> 570dbb437


[minor] Use MemoryPersistenceAdapter for testing when choice of persistence adapter is indifferent


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

Branch: refs/heads/trunk
Commit: 570dbb437210b6190920932257fcd1b255155a66
Parents: d793db4
Author: Hadrian Zbarcea <hadrian@apache.org>
Authored: Mon Mar 10 11:00:08 2014 -0400
Committer: Hadrian Zbarcea <hadrian@apache.org>
Committed: Mon Mar 10 11:00:27 2014 -0400

----------------------------------------------------------------------
 .../activemq/usecases/ExpiredMessagesTest.java  | 23 ++++++++++----------
 1 file changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/570dbb43/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java
index 15597dc..4c97972 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java
@@ -17,6 +17,7 @@
 package org.apache.activemq.usecases;
 
 import junit.framework.Test;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.CombinationTestSupport;
 import org.apache.activemq.broker.BrokerService;
@@ -26,12 +27,13 @@ import org.apache.activemq.broker.region.policy.PolicyMap;
 import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.leveldb.LevelDBStore;
+import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
 import org.apache.activemq.util.Wait;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.jms.*;
+
 import java.io.File;
 import java.util.concurrent.atomic.AtomicLong;
 
@@ -68,6 +70,13 @@ public class ExpiredMessagesTest extends CombinationTestSupport {
         brokerUri = broker.getTransportConnectors().get(0).getPublishableConnectString();
     }
 
+    @Override
+    protected void tearDown() throws Exception {
+        connection.stop();
+        broker.stop();
+        broker.waitUntilStopped();
+    }
+
     public void testExpiredMessages() throws Exception {
 
         ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(brokerUri);
@@ -291,9 +300,7 @@ public class ExpiredMessagesTest extends CombinationTestSupport {
         BrokerService broker = new BrokerService();
         broker.setBrokerName("localhost");
         broker.setDestinations(new ActiveMQDestination[]{destination});
-        LevelDBStore adaptor = new LevelDBStore();
-        adaptor.setDirectory(new File("target/expiredtest-data/"));
-        broker.setPersistenceAdapter(adaptor);
+        broker.setPersistenceAdapter(new MemoryPersistenceAdapter());
 
         PolicyEntry defaultPolicy = new PolicyEntry();
         if (useVMCursor) {
@@ -311,12 +318,4 @@ public class ExpiredMessagesTest extends CombinationTestSupport {
         return broker;
     }
 
-
-
-    @Override
-    protected void tearDown() throws Exception {
-        connection.stop();
-        broker.stop();
-        broker.waitUntilStopped();
-    }
 }


Mime
View raw message