servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccust...@apache.org
Subject svn commit: r824969 - in /servicemix/components/engines/servicemix-wsn2005/trunk: pom.xml src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java src/test/resources/org/apache/servicemix/wsn/spring.xml
Date Tue, 13 Oct 2009 23:09:25 GMT
Author: ccustine
Date: Tue Oct 13 23:09:24 2009
New Revision: 824969

URL: http://svn.apache.org/viewvc?rev=824969&view=rev
Log:
SMXCOMP-647 - Use dynamic ports for tests
- servicemix-wsn2005

Modified:
    servicemix/components/engines/servicemix-wsn2005/trunk/pom.xml
    servicemix/components/engines/servicemix-wsn2005/trunk/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java
    servicemix/components/engines/servicemix-wsn2005/trunk/src/test/resources/org/apache/servicemix/wsn/spring.xml

Modified: servicemix/components/engines/servicemix-wsn2005/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-wsn2005/trunk/pom.xml?rev=824969&r1=824968&r2=824969&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-wsn2005/trunk/pom.xml (original)
+++ servicemix/components/engines/servicemix-wsn2005/trunk/pom.xml Tue Oct 13 23:09:24 2009
@@ -232,6 +232,37 @@
           </execution>
         </executions>
       </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+            <environmentVariables>
+              <activemq.port1>${port1}</activemq.port1>
+              <activemq.port2>${port2}</activemq.port2>
+            </environmentVariables>
+          </configuration>
+        </plugin>
+          <plugin>
+              <groupId>org.codehaus.mojo</groupId>
+              <artifactId>build-helper-maven-plugin</artifactId>
+              <version>1.4</version>
+              <executions>
+                  <execution>
+                      <id>reserve-network-port</id>
+                      <goals>
+                          <goal>reserve-network-port</goal>
+                      </goals>
+                      <phase>process-resources</phase>
+                      <configuration>
+                          <portNames>
+                              <portName>port1</portName>
+                              <portName>port2</portName>
+                          </portNames>
+                      </configuration>
+                  </execution>
+              </executions>
+          </plugin>
+        
     </plugins>
   </build>
 </project>

Modified: servicemix/components/engines/servicemix-wsn2005/trunk/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-wsn2005/trunk/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java?rev=824969&r1=824968&r2=824969&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-wsn2005/trunk/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java
(original)
+++ servicemix/components/engines/servicemix-wsn2005/trunk/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java
Tue Oct 13 23:09:24 2009
@@ -77,7 +77,7 @@
     protected void setUp() throws Exception {
         jmsBroker = new BrokerService();
         jmsBroker.setPersistent(false);
-        jmsBroker.addConnector("tcp://localhost:61616");
+        jmsBroker.addConnector("tcp://localhost:" + System.getenv("activemq.port1"));
         jmsBroker.start();
 
         jbi = new JBIContainer();
@@ -89,7 +89,7 @@
         client = new DefaultServiceMixClient(jbi);
 
         wsnComponent = new WSNComponent();
-        wsnComponent.setConnectionFactory(new ActiveMQConnectionFactory("tcp://localhost:61616"));
+        wsnComponent.setConnectionFactory(new ActiveMQConnectionFactory("tcp://localhost:"
+ System.getenv("activemq.port1")));
         ActivationSpec as = new ActivationSpec();
         as.setComponentName("servicemix-wsn2005");
         as.setComponent(wsnComponent);

Modified: servicemix/components/engines/servicemix-wsn2005/trunk/src/test/resources/org/apache/servicemix/wsn/spring.xml
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-wsn2005/trunk/src/test/resources/org/apache/servicemix/wsn/spring.xml?rev=824969&r1=824968&r2=824969&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-wsn2005/trunk/src/test/resources/org/apache/servicemix/wsn/spring.xml
(original)
+++ servicemix/components/engines/servicemix-wsn2005/trunk/src/test/resources/org/apache/servicemix/wsn/spring.xml
Tue Oct 13 23:09:24 2009
@@ -21,6 +21,8 @@
   xmlns:wsn="http://servicemix.apache.org/wsn/1.0" xmlns:amq="http://activemq.org/config/1.0"
   xmlns:test="http://servicemix.org/test">
 
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
/>
+
   <!-- the JBI container -->
   <sm:container id="jbi" embedded="true">
     <sm:activationSpecs>
@@ -76,13 +78,13 @@
 
   <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
     depends-on="broker">
-    <property name="brokerURL" value="tcp://localhost:61216" />
+    <property name="brokerURL" value="tcp://localhost:${activemq.port2}" />
   </bean>
 
   <amq:broker id="broker" persistent="false">
 
     <amq:transportConnectors>
-      <amq:transportConnector uri="tcp://localhost:61216" />
+      <amq:transportConnector uri="tcp://localhost:${activemq.port2}" />
     </amq:transportConnectors>
 
   </amq:broker>



Mime
View raw message