svn commit: r550575 - in /activemq/camel/trunk: ./ camel-core/ camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/util/ components/camel-jms/src/test/java/org/apache/camel/component/jms/ components/camel-jms/sr...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r550575 - in /activemq/camel/trunk: ./ camel-core/ camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/util/ components/camel-jms/src/test/java/org/apache/camel/component/jms/ components/camel-jms/sr...

jstrachan-2
Author: jstrachan
Date: Mon Jun 25 12:01:50 2007
New Revision: 550575

URL: http://svn.apache.org/viewvc?view=rev&rev=550575
Log:
added integration test profile to build (and renamed spring XML files called *Test.*) to avoid clashing with surefire matchers

Added:
    activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsRouteUsingSpring.xml
      - copied unchanged from r550438, activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsRouteUsingSpringTest.xml
    activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsRouteUsingSpringAndJmsName.xml
      - copied unchanged from r550438, activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsRouteUsingSpringAndJmsNameTest.xml
    activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsRouteUsingSpringWithAutoWire.xml
      - copied unchanged from r550438, activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsRouteUsingSpringWithAutoWireTest.xml
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml   (contents, props changed)
      - copied, changed from r550438, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBeanTest.xml
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/injectedBean.xml
      - copied unchanged from r550438, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/injectedBeanTest.xml
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactory.xml   (contents, props changed)
      - copied, changed from r550438, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactoryTest.xml
Removed:
    activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsRouteUsingSpringAndJmsNameTest.xml
    activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsRouteUsingSpringTest.xml
    activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsRouteUsingSpringWithAutoWireTest.xml
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBeanTest.xml
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/injectedBeanTest.xml
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactoryTest.xml
Modified:
    activemq/camel/trunk/camel-core/pom.xml
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/WhenBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java
    activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringAndJmsNameTest.java
    activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringTest.java
    activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringWithAutoWireTest.java
    activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java
    activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/InjectedBeanTest.java
    activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/RoutingUsingCamelContextFactoryTest.java
    activemq/camel/trunk/pom.xml

Modified: activemq/camel/trunk/camel-core/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/pom.xml?view=diff&rev=550575&r1=550574&r2=550575
==============================================================================
--- activemq/camel/trunk/camel-core/pom.xml (original)
+++ activemq/camel/trunk/camel-core/pom.xml Mon Jun 25 12:01:50 2007
@@ -91,23 +91,6 @@
           </execution>
         </executions>
       </plugin>
-
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <childDelegation>false</childDelegation>
-          <useFile>true</useFile>
-          <includes>
-            <include>**/*Test.*</include>
-          </includes>
-          <excludes>
-            <exclude>**/PojoRouteTest.*</exclude>
-            <!-- TODO fixme ASAP -->
-            <exclude>**/ResequencerTest.*</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
-
     </plugins>
   </build>
 

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/WhenBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/WhenBuilder.java?view=diff&rev=550575&r1=550574&r2=550575
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/WhenBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/WhenBuilder.java Mon Jun 25 12:01:50 2007
@@ -19,6 +19,7 @@
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.Predicate;
+import org.apache.camel.Processor;
 
 /**
  * @version $Revision$
@@ -33,17 +34,22 @@
 
     @Override
     @Fluent
-    public ChoiceBuilder to(@FluentArg("ref") Endpoint endpoint) {
+    public ChoiceBuilder to(@FluentArg("ref")Endpoint endpoint) {
         super.to(endpoint);
         return parent;
     }
 
     @Override
     @Fluent
-    public ChoiceBuilder to(@FluentArg("uri")  String uri) {
+    public ChoiceBuilder to(@FluentArg("uri")String uri) {
         super.to(uri);
         return parent;
     }
 
-    
+    @Override
+    @Fluent
+    public ChoiceBuilder process(@FluentArg("ref")Processor processor) {
+        super.process(processor);  
+        return parent;
+    }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java?view=diff&rev=550575&r1=550574&r2=550575
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java Mon Jun 25 12:01:50 2007
@@ -37,10 +37,7 @@
      */
     public static void startServices(Object... services) throws Exception {
         for (Object value : services) {
-            if (value instanceof Service) {
-                Service service = (Service) value;
-                service.start();
-            }
+            startService(value);
         }
     }
 
@@ -56,6 +53,15 @@
         }
     }
 
+    public static void startService(Object value) throws Exception {
+        if (value instanceof Service) {
+            Service service = (Service) value;
+            service.start();
+        }
+        else if (value instanceof Collection) {
+            startServices((Collection) value);
+        }
+    }
 
     /**
      * Stops all of the given services, throwing the first exception caught

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringAndJmsNameTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringAndJmsNameTest.java?view=diff&rev=550575&r1=550574&r2=550575
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringAndJmsNameTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringAndJmsNameTest.java Mon Jun 25 12:01:50 2007
@@ -24,7 +24,7 @@
 public class JmsRouteUsingSpringAndJmsNameTest extends JmsRouteUsingSpringTest {
 
     protected ClassPathXmlApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("org/apache/camel/component/jms/jmsRouteUsingSpringAndJmsNameTest.xml");
+        return new ClassPathXmlApplicationContext("org/apache/camel/component/jms/jmsRouteUsingSpringAndJmsName.xml");
     }
 
 

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringTest.java?view=diff&rev=550575&r1=550574&r2=550575
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringTest.java Mon Jun 25 12:01:50 2007
@@ -32,7 +32,7 @@
     }
 
     protected ClassPathXmlApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("org/apache/camel/component/jms/jmsRouteUsingSpringTest.xml");
+        return new ClassPathXmlApplicationContext("org/apache/camel/component/jms/jmsRouteUsingSpring.xml");
     }
 
     @Override

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringWithAutoWireTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringWithAutoWireTest.java?view=diff&rev=550575&r1=550574&r2=550575
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringWithAutoWireTest.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteUsingSpringWithAutoWireTest.java Mon Jun 25 12:01:50 2007
@@ -24,7 +24,7 @@
 public class JmsRouteUsingSpringWithAutoWireTest extends JmsRouteUsingSpringAndJmsNameTest {
 
     protected ClassPathXmlApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("org/apache/camel/component/jms/jmsRouteUsingSpringWithAutoWireTest.xml");
+        return new ClassPathXmlApplicationContext("org/apache/camel/component/jms/jmsRouteUsingSpringWithAutoWire.xml");
     }
 
 }

Modified: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java?view=diff&rev=550575&r1=550574&r2=550575
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java Mon Jun 25 12:01:50 2007
@@ -37,14 +37,14 @@
     private static final transient Log log = LogFactory.getLog(CamelContextFactoryBeanTest.class);
     
     public void testClassPathRouteLoading() throws Exception {
-        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/spring/camelContextFactoryBeanTest.xml");
+        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/spring/camelContextFactoryBean.xml");
 
         CamelContext context = (CamelContext) applicationContext.getBean("camel");
         assertValidContext(context);
     }
 
     public void testClassPathRouteLoadingUsingNamespaces() throws Exception {
-        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/spring/camelContextFactoryBeanTest.xml");
+        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/spring/camelContextFactoryBean.xml");
 
         CamelContext context = (CamelContext) applicationContext.getBean("camel3");
         assertValidContext(context);
@@ -69,7 +69,7 @@
     }
 
     public void testXMLRouteLoading() throws Exception {
-        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/spring/camelContextFactoryBeanTest.xml");
+        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/spring/camelContextFactoryBean.xml");
 
         CamelContext context = (CamelContext) applicationContext.getBean("camel2");
         assertNotNull("No context found!", context);

Modified: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/InjectedBeanTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/InjectedBeanTest.java?view=diff&rev=550575&r1=550574&r2=550575
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/InjectedBeanTest.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/InjectedBeanTest.java Mon Jun 25 12:01:50 2007
@@ -53,7 +53,7 @@
     }
 
     protected ClassPathXmlApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("org/apache/camel/spring/injectedBeanTest.xml");
+        return new ClassPathXmlApplicationContext("org/apache/camel/spring/injectedBean.xml");
     }
 
     protected int getExpectedRouteCount() {

Modified: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/RoutingUsingCamelContextFactoryTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/RoutingUsingCamelContextFactoryTest.java?view=diff&rev=550575&r1=550574&r2=550575
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/RoutingUsingCamelContextFactoryTest.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/RoutingUsingCamelContextFactoryTest.java Mon Jun 25 12:01:50 2007
@@ -67,7 +67,7 @@
     }
 
     protected ClassPathXmlApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("org/apache/camel/spring/routingUsingCamelContextFactoryTest.xml");
+        return new ClassPathXmlApplicationContext("org/apache/camel/spring/routingUsingCamelContextFactory.xml");
     }
 
     @Override

Copied: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml (from r550438, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBeanTest.xml)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml?view=diff&rev=550575&p1=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBeanTest.xml&r1=550438&p2=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml&r2=550575
==============================================================================
    (empty)

Propchange: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Copied: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactory.xml (from r550438, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactoryTest.xml)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactory.xml?view=diff&rev=550575&p1=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactoryTest.xml&r1=550438&p2=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactory.xml&r2=550575
==============================================================================
    (empty)

Propchange: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactory.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/pom.xml?view=diff&rev=550575&r1=550574&r2=550575
==============================================================================
--- activemq/camel/trunk/pom.xml (original)
+++ activemq/camel/trunk/pom.xml Mon Jun 25 12:01:50 2007
@@ -581,6 +581,17 @@
           </execution>
         </executions>
       </plugin>
+
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <childDelegation>false</childDelegation>
+          <useFile>true</useFile>
+          <includes>
+            <include>**/*Test.*</include>
+          </includes>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
@@ -721,6 +732,25 @@
           <url>http://snapshots.repository.codehaus.org/</url>
         </pluginRepository>
       </pluginRepositories>
+    </profile>
+
+    <profile>
+      <id>integration</id>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <childDelegation>false</childDelegation>
+              <useFile>true</useFile>
+              <includes>
+                <include>**/*Test.*</include>
+                <include>**/*Integration.*</include>
+              </includes>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
     </profile>
   </profiles>
 </project>