activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-5621
Date Mon, 15 Jun 2015 14:18:44 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 1d0f0d541 -> 33fb7c609


https://issues.apache.org/jira/browse/AMQ-5621

Have the test store its data in the target folder to let the clean step
remove it and attempt to remove the data folder between runs to avoid
state derby instances.  

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

Branch: refs/heads/master
Commit: 33fb7c6096c0786997f76caccd0c4e3e02e40a33
Parents: 1d0f0d5
Author: Timothy Bish <tabish121@gmail.com>
Authored: Mon Jun 15 10:18:28 2015 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Mon Jun 15 10:18:28 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/activemq/bugs/AMQ5567Test.java | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/33fb7c60/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java
index c0e1c14..a17d3f8 100755
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java
@@ -18,11 +18,14 @@ package org.apache.activemq.bugs;
 
 import java.io.File;
 import java.util.concurrent.TimeUnit;
+
 import javax.jms.JMSException;
 import javax.jms.TextMessage;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
+
 import junit.framework.Test;
+
 import org.apache.activemq.broker.BrokerRestartTestSupport;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.StubConnection;
@@ -46,8 +49,11 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class AMQ5567Test extends BrokerRestartTestSupport {
+
     protected static final Logger LOG = LoggerFactory.getLogger(AMQ5567Test.class);
-    ActiveMQQueue destination = new ActiveMQQueue("Q");
+
+    private final ActiveMQQueue destination = new ActiveMQQueue("Q");
+    private final String DATA_FOLDER = "./target/AMQ5567Test-data";
 
     @Override
     protected void configureBroker(BrokerService broker) throws Exception {
@@ -55,12 +61,19 @@ public class AMQ5567Test extends BrokerRestartTestSupport {
         broker.setPersistenceAdapter(persistenceAdapter);
     }
 
+    @Override
     protected PolicyEntry getDefaultPolicy() {
         PolicyEntry policy = new PolicyEntry();
         policy.setMemoryLimit(60*1024);
         return policy;
     }
 
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        IOHelper.delete(new File(DATA_FOLDER));
+    }
+
     public void initCombosForTestPreparedTransactionNotDispatched() throws Exception {
         PersistenceAdapter[] persistenceAdapters = new PersistenceAdapter[]{
                 new KahaDBPersistenceAdapter(),
@@ -68,7 +81,7 @@ public class AMQ5567Test extends BrokerRestartTestSupport {
                 new JDBCPersistenceAdapter()
         };
         for (PersistenceAdapter adapter : persistenceAdapters) {
-            adapter.setDirectory(new File(IOHelper.getDefaultDataDirectory()));
+            adapter.setDirectory(new File(DATA_FOLDER));
         }
         addCombinationValues("persistenceAdapter", persistenceAdapters);
     }


Mime
View raw message