camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r785885 - in /camel/trunk/components/camel-rmi: pom.xml src/test/java/org/apache/camel/component/rmi/RmiConcurrencyTest.java src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
Date Thu, 18 Jun 2009 03:30:29 GMT
Author: ningjiang
Date: Thu Jun 18 03:30:29 2009
New Revision: 785885

URL: http://svn.apache.org/viewvc?rev=785885&view=rev
Log:
CAMEL-1712 Upgraded the camel-rmi to JUnit4

Modified:
    camel/trunk/components/camel-rmi/pom.xml
    camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiConcurrencyTest.java
    camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java

Modified: camel/trunk/components/camel-rmi/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-rmi/pom.xml?rev=785885&r1=785884&r2=785885&view=diff
==============================================================================
--- camel/trunk/components/camel-rmi/pom.xml (original)
+++ camel/trunk/components/camel-rmi/pom.xml Thu Jun 18 03:30:29 2009
@@ -43,8 +43,7 @@
 
     <dependency>
       <groupId>org.apache.camel</groupId>
-      <artifactId>camel-core</artifactId>
-      <type>test-jar</type>
+      <artifactId>camel-test</artifactId>      
       <scope>test</scope>
     </dependency>
 

Modified: camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiConcurrencyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiConcurrencyTest.java?rev=785885&r1=785884&r2=785885&view=diff
==============================================================================
--- camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiConcurrencyTest.java
(original)
+++ camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiConcurrencyTest.java
Thu Jun 18 03:30:29 2009
@@ -23,14 +23,15 @@
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.JndiRegistry;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
 
 /**
  * @version $Revision$
  */
-public class RmiConcurrencyTest extends ContextTestSupport {
+public class RmiConcurrencyTest extends CamelTestSupport {
 
     private static boolean created;
 
@@ -54,10 +55,12 @@
         return context;
     }
 
+    @Test
     public void testNoConcurrentProducers() throws Exception {
         doSendMessages(1, 1);
     }
 
+    @Test
     public void testConcurrentProducers() throws Exception {
         doSendMessages(10, 5);
     }
@@ -109,7 +112,7 @@
             for (int i = 0; i < urls.length; i++) {
                 if (urls[i].getPath().contains(" ")) {
                     System.err.println("=======================================================================");
-                    System.err.println(" TEST Skipped: " + getName());
+                    System.err.println(" TEST Skipped: " + this.getClass().getName());
                     System.err.println("   Your probably on windows.  We detected that the
classpath");
                     System.err.println("   has a space in it.  Try running maven with the
following option: ");
                     System.err.println("   -Dmaven.repo.local=C:\\DOCUME~1\\userid\\.m2\\repository");

Modified: camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java?rev=785885&r1=785884&r2=785885&view=diff
==============================================================================
--- camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
(original)
+++ camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
Thu Jun 18 03:30:29 2009
@@ -20,24 +20,25 @@
 import java.net.URLClassLoader;
 import java.rmi.registry.LocateRegistry;
 
-import junit.framework.TestCase;
-
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.bean.ProxyHelper;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.util.jndi.JndiContext;
+import org.junit.Assert;
+import org.junit.Test;
 
 /**
  * @version $Revision$
  */
-public class RmiRouteTest extends TestCase {
+public class RmiRouteTest extends Assert {
 
     protected int getPort() {
         return 37541;
     }
 
+    @Test
     public void testPojoRoutes() throws Exception {
         if (classPathHasSpaces()) {
             return;
@@ -92,7 +93,7 @@
             for (int i = 0; i < urls.length; i++) {
                 if (urls[i].getPath().contains(" ")) {
                     System.err.println("=======================================================================");
-                    System.err.println(" TEST Skipped: " + getName());
+                    System.err.println(" TEST Skipped: " + this.getClass().getName());
                     System.err.println("   Your probably on windows.  We detected that the
classpath");
                     System.err.println("   has a space in it.  Try running maven with the
following option: ");
                     System.err.println("   -Dmaven.repo.local=C:\\DOCUME~1\\userid\\.m2\\repository");



Mime
View raw message