camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r906884 - in /camel/trunk/tests/camel-itest/src/test: java/org/apache/camel/itest/jms/ resources/
Date Fri, 05 Feb 2010 10:01:57 GMT
Author: davsclaus
Date: Fri Feb  5 10:01:57 2010
New Revision: 906884

URL: http://svn.apache.org/viewvc?rev=906884&view=rev
Log:
Using different port number to avoid clash.

Added:
    camel/trunk/tests/camel-itest/src/test/resources/activemq7.xml
      - copied, changed from r906832, camel/trunk/tests/camel-itest/src/test/resources/activemq.xml
    camel/trunk/tests/camel-itest/src/test/resources/activemq8.xml
      - copied, changed from r906832, camel/trunk/tests/camel-itest/src/test/resources/activemq.xml
Modified:
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsMediumQueuePerformanceTest.java
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java
    camel/trunk/tests/camel-itest/src/test/resources/activemq.xml

Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsMediumQueuePerformanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsMediumQueuePerformanceTest.java?rev=906884&r1=906883&r2=906884&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsMediumQueuePerformanceTest.java
(original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsMediumQueuePerformanceTest.java
Fri Feb  5 10:01:57 2010
@@ -16,6 +16,12 @@
  */
 package org.apache.camel.itest.jms;
 
+import javax.jms.ConnectionFactory;
+import javax.naming.Context;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.camel.component.jms.JmsComponent;
+import org.apache.camel.util.jndi.JndiContext;
 import org.junit.Test;
 
 /**
@@ -25,6 +31,24 @@
     protected int mediumQueueCount = 1000;
 
     @Override
+    protected String getActiveMQFileName() {
+        // using different port number to avoid clash
+        return "activemq8.xml";
+    }
+
+    @Override
+    protected Context createJndiContext() throws Exception {
+        JndiContext answer = new JndiContext();
+        answer.bind("myBean", myBean);
+
+        // add ActiveMQ client
+        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61618");
+        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
+
+        return answer;
+    }
+
+    @Override
     @Test
     public void testSendingAndReceivingMessages() throws Exception {
         int expected = mediumQueueCount + messageCount;

Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java?rev=906884&r1=906883&r2=906884&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java
(original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java
Fri Feb  5 10:01:57 2010
@@ -18,9 +18,12 @@
 
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
+import javax.jms.ConnectionFactory;
 import javax.naming.Context;
 
+import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jms.JmsComponent;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.camel.util.jndi.JndiContext;
 import org.apache.commons.logging.Log;
@@ -44,6 +47,11 @@
     protected boolean useLocalBroker = true;
     private int consumedMessageCount;
 
+    protected String getActiveMQFileName() {
+        // using different port number to avoid clash
+        return "activemq7.xml";
+    }
+
     @Test
     public void testSendingAndReceivingMessages() throws Exception {
         setExpectedMessageCount(messageCount);
@@ -89,7 +97,7 @@
     @Before
     public void setUp() throws Exception {
         if (useLocalBroker) {
-            applicationContext = new ClassPathXmlApplicationContext("activemq.xml");
+            applicationContext = new ClassPathXmlApplicationContext(getActiveMQFileName());
             applicationContext.start();
         }
 
@@ -118,6 +126,11 @@
     protected Context createJndiContext() throws Exception {
         JndiContext answer = new JndiContext();
         answer.bind("myBean", myBean);
+
+        // add ActiveMQ client
+        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61617");
+        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
+
         return answer;
     }
 

Modified: camel/trunk/tests/camel-itest/src/test/resources/activemq.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/activemq.xml?rev=906884&r1=906883&r2=906884&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/activemq.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/activemq.xml Fri Feb  5 10:01:57 2010
@@ -20,7 +20,7 @@
   xmlns:broker="http://activemq.apache.org/schema/core"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.2.0.xsd">
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
 
    <broker:broker id="broker" useJmx="false" persistent="false" dataDirectory="target/activemq">
     <broker:transportConnectors>

Copied: camel/trunk/tests/camel-itest/src/test/resources/activemq7.xml (from r906832, camel/trunk/tests/camel-itest/src/test/resources/activemq.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/activemq7.xml?p2=camel/trunk/tests/camel-itest/src/test/resources/activemq7.xml&p1=camel/trunk/tests/camel-itest/src/test/resources/activemq.xml&r1=906832&r2=906884&rev=906884&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/activemq.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/activemq7.xml Fri Feb  5 10:01:57 2010
@@ -20,11 +20,11 @@
   xmlns:broker="http://activemq.apache.org/schema/core"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.2.0.xsd">
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
 
    <broker:broker id="broker" useJmx="false" persistent="false" dataDirectory="target/activemq">
     <broker:transportConnectors>
-       <broker:transportConnector name="openwire" uri="tcp://localhost:61616"/>
+       <broker:transportConnector name="openwire" uri="tcp://localhost:61617"/>
     </broker:transportConnectors>
   </broker:broker>
 

Copied: camel/trunk/tests/camel-itest/src/test/resources/activemq8.xml (from r906832, camel/trunk/tests/camel-itest/src/test/resources/activemq.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/activemq8.xml?p2=camel/trunk/tests/camel-itest/src/test/resources/activemq8.xml&p1=camel/trunk/tests/camel-itest/src/test/resources/activemq.xml&r1=906832&r2=906884&rev=906884&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/activemq.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/activemq8.xml Fri Feb  5 10:01:57 2010
@@ -20,11 +20,11 @@
   xmlns:broker="http://activemq.apache.org/schema/core"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.2.0.xsd">
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
 
    <broker:broker id="broker" useJmx="false" persistent="false" dataDirectory="target/activemq">
     <broker:transportConnectors>
-       <broker:transportConnector name="openwire" uri="tcp://localhost:61616"/>
+       <broker:transportConnector name="openwire" uri="tcp://localhost:61618"/>
     </broker:transportConnectors>
   </broker:broker>
 



Mime
View raw message