camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1211365 - in /camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms: ./ temp/
Date Wed, 07 Dec 2011 10:07:17 GMT
Author: davsclaus
Date: Wed Dec  7 10:07:17 2011
New Revision: 1211365

URL: http://svn.apache.org/viewvc?rev=1211365&view=rev
Log:
Fixed camel-jms tests on Windows when using persistent AMQ broker

Modified:
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/CamelJmsTestHelper.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumerTemplateJmsSelectorTest.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAutoStartupTest.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDeadLetterChannelInOutTest.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDurableTopicTest.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerDisableReplyToTest.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteDeliveryModePreserveQoSTest.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSuspendResumeTest.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsThrottlingInflightRoutePolicyTest.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/TwoConsumerOnSameTopicTest.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/temp/TemporaryQueueRouteTest.java

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/CamelJmsTestHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/CamelJmsTestHelper.java?rev=1211365&r1=1211364&r2=1211365&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/CamelJmsTestHelper.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/CamelJmsTestHelper.java
Wed Dec  7 10:07:17 2011
@@ -70,7 +70,11 @@ public final class CamelJmsTestHelper {
     public static ConnectionFactory createPersistentConnectionFactory(String options) {
         // using a unique broker name improves testing when running the entire test suite
in the same JVM
         int id = counter.incrementAndGet();
-        String url = "vm://test-broker-" + id + "?broker.persistent=true&broker.useJmx=false";
+
+        // use an unique data directory in target
+        String dir = "target/activemq-data-" + id;
+
+        String url = "vm://test-broker-" + id + "?broker.persistent=true&broker.useJmx=false&broker.dataDirectory="
+ dir;
         if (options != null) {
             url = url + "&" + options;
         }

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumerTemplateJmsSelectorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumerTemplateJmsSelectorTest.java?rev=1211365&r1=1211364&r2=1211365&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumerTemplateJmsSelectorTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/ConsumerTemplateJmsSelectorTest.java
Wed Dec  7 10:07:17 2011
@@ -42,8 +42,6 @@ public class ConsumerTemplateJmsSelector
     }
 
     protected CamelContext createCamelContext() throws Exception {
-        deleteDirectory("activemq-data");
-
         CamelContext camelContext = super.createCamelContext();
 
         // must be persistent to rember the messages

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAutoStartupTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAutoStartupTest.java?rev=1211365&r1=1211364&r2=1211365&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAutoStartupTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAutoStartupTest.java
Wed Dec  7 10:07:17 2011
@@ -72,7 +72,6 @@ public class JmsAutoStartupTest extends 
     }
 
     protected CamelContext createCamelContext() throws Exception {
-        deleteDirectory("activemq-data");
         CamelContext camelContext = super.createCamelContext();
 
         // must use persistent so the message is not lost

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDeadLetterChannelInOutTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDeadLetterChannelInOutTest.java?rev=1211365&r1=1211364&r2=1211365&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDeadLetterChannelInOutTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDeadLetterChannelInOutTest.java
Wed Dec  7 10:07:17 2011
@@ -33,12 +33,6 @@ import static org.apache.camel.component
  */
 public class JmsDeadLetterChannelInOutTest extends CamelTestSupport {
 
-    @Override
-    public void setUp() throws Exception {
-        deleteDirectory("activemq-data");
-        super.setUp();
-    }
-
     @Test
     public void testJmsDLCInOut() throws Exception {
         Exchange out = template.send("direct:start", new Processor() {

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDurableTopicTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDurableTopicTest.java?rev=1211365&r1=1211364&r2=1211365&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDurableTopicTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDurableTopicTest.java
Wed Dec  7 10:07:17 2011
@@ -31,12 +31,6 @@ import static org.apache.camel.component
  */
 public class JmsDurableTopicTest extends CamelTestSupport {
 
-    @Override
-    public void setUp() throws Exception {
-        deleteDirectory("./activemq-data");
-        super.setUp();
-    }
-
     @Test
     public void testDurableTopic() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerDisableReplyToTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerDisableReplyToTest.java?rev=1211365&r1=1211364&r2=1211365&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerDisableReplyToTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerDisableReplyToTest.java
Wed Dec  7 10:07:17 2011
@@ -29,12 +29,6 @@ import static org.apache.camel.component
  */
 public class JmsProducerDisableReplyToTest extends CamelTestSupport {
 
-    @Override
-    public void setUp() throws Exception {
-        deleteDirectory("activemq-data");
-        super.setUp();
-    }
-
     @Test
     public void testProducerDisableReplyTo() throws Exception {
         String url = "activemq:queue:foo?disableReplyTo=true";

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteDeliveryModePreserveQoSTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteDeliveryModePreserveQoSTest.java?rev=1211365&r1=1211364&r2=1211365&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteDeliveryModePreserveQoSTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteDeliveryModePreserveQoSTest.java
Wed Dec  7 10:07:17 2011
@@ -110,7 +110,6 @@ public class JmsRouteDeliveryModePreserv
     }
 
     protected CamelContext createCamelContext() throws Exception {
-        deleteDirectory("activemq-data");
         CamelContext camelContext = super.createCamelContext();
 
         ConnectionFactory connectionFactory = CamelJmsTestHelper.createPersistentConnectionFactory();

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSuspendResumeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSuspendResumeTest.java?rev=1211365&r1=1211364&r2=1211365&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSuspendResumeTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSuspendResumeTest.java
Wed Dec  7 10:07:17 2011
@@ -62,7 +62,6 @@ public class JmsSuspendResumeTest extend
     }
 
     protected CamelContext createCamelContext() throws Exception {
-        deleteDirectory("activemq-data");
         CamelContext camelContext = super.createCamelContext();
 
         // must use persistent so the message is not lost

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsThrottlingInflightRoutePolicyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsThrottlingInflightRoutePolicyTest.java?rev=1211365&r1=1211364&r2=1211365&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsThrottlingInflightRoutePolicyTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsThrottlingInflightRoutePolicyTest.java
Wed Dec  7 10:07:17 2011
@@ -33,12 +33,6 @@ public class JmsThrottlingInflightRouteP
 
     private int size = 200;
 
-    @Override
-    public void setUp() throws Exception {
-        deleteDirectory("activemq-data");
-        super.setUp();
-    }
-
     @Test
     public void testJmsThrottlingInflightRoutePolicy() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/TwoConsumerOnSameTopicTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/TwoConsumerOnSameTopicTest.java?rev=1211365&r1=1211364&r2=1211365&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/TwoConsumerOnSameTopicTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/TwoConsumerOnSameTopicTest.java
Wed Dec  7 10:07:17 2011
@@ -118,11 +118,9 @@ public class TwoConsumerOnSameTopicTest 
     }
 
     protected CamelContext createCamelContext() throws Exception {
-        deleteDirectory("activemq-data");
-
         CamelContext camelContext = super.createCamelContext();
 
-        // must be persistent to rember the messages
+        // must be persistent to remember the messages
         ConnectionFactory connectionFactory = CamelJmsTestHelper.createPersistentConnectionFactory();
         camelContext.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));
 

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/temp/TemporaryQueueRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/temp/TemporaryQueueRouteTest.java?rev=1211365&r1=1211364&r2=1211365&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/temp/TemporaryQueueRouteTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/temp/TemporaryQueueRouteTest.java
Wed Dec  7 10:07:17 2011
@@ -66,8 +66,6 @@ public class TemporaryQueueRouteTest ext
     }
 
     protected CamelContext createCamelContext() throws Exception {
-        deleteDirectory("activemq-data");
-
         CamelContext camelContext = super.createCamelContext();
 
         ConnectionFactory connectionFactory = CamelJmsTestHelper.createPersistentConnectionFactory();



Mime
View raw message