activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r599470 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java
Date Thu, 29 Nov 2007 15:03:30 GMT
Author: rajdavies
Date: Thu Nov 29 07:03:29 2007
New Revision: 599470

URL: http://svn.apache.org/viewvc?rev=599470&view=rev
Log:
updated so that we can use delete the db on start-up

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java?rev=599470&r1=599469&r2=599470&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java
Thu Nov 29 07:03:29 2007
@@ -64,7 +64,7 @@
         consumerConnection.start();
         consumerConnection.close();
         broker.stop();
-        broker =createBroker();
+        broker =createBroker(false);
         
         Connection producerConnection = factory.createConnection();
        
@@ -82,7 +82,7 @@
         }
         producerConnection.close();
         broker.stop();
-        broker =createBroker();
+        broker =createBroker(false);
         
         consumerConnection = factory.createConnection();
         consumerConnection.setClientID(CONSUMER_NAME);
@@ -105,7 +105,7 @@
     
     protected void setUp() throws Exception {
         if (broker == null) {
-            broker = createBroker();
+            broker = createBroker(true);
         }
         
        
@@ -131,19 +131,19 @@
      * 
      * @throws Exception
      */
-    protected BrokerService createBroker() throws Exception {
+    protected BrokerService createBroker(boolean deleteStore) throws Exception {
         BrokerService answer = new BrokerService();
-        configureBroker(answer);
+        configureBroker(answer,deleteStore);
         answer.start();
         return answer;
     }
 
     
 
-    protected void configureBroker(BrokerService answer) throws Exception {
+    protected void configureBroker(BrokerService answer,boolean deleteStore) throws Exception
{
+        answer.setDeleteAllMessagesOnStartup(deleteStore);
         answer.addConnector(bindAddress);
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.setUseShutdownHook(false);
+        answer.setUseShutdownHook(true);
     }
 
     protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {



Mime
View raw message