You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2009/08/09 05:12:23 UTC
svn commit: r802479 - in /camel/branches/camel-1.x: ./
examples/camel-example-spring-jms/
examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/
examples/camel-example-spring-jms/src/test/
examples/camel-example-spring-jms/src...
Author: ningjiang
Date: Sun Aug 9 03:12:22 2009
New Revision: 802479
URL: http://svn.apache.org/viewvc?rev=802479&view=rev
Log:
Merged revisions 802478 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk
........
r802478 | ningjiang | 2009-08-09 10:56:42 +0800 (Sun, 09 Aug 2009) | 1 line
CAMEL-1891 added unit tests for camel-example-spring-jms
........
Added:
camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/
- copied from r802478, camel/trunk/examples/camel-example-spring-jms/src/test/
camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/
- copied from r802478, camel/trunk/examples/camel-example-spring-jms/src/test/java/
camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/
- copied from r802478, camel/trunk/examples/camel-example-spring-jms/src/test/java/org/
camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/
- copied from r802478, camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/
camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/
- copied from r802478, camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/
camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/
- copied from r802478, camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/
camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsAOPClientServerTest.java
- copied, changed from r802478, camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsAOPClientServerTest.java
camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java
- copied, changed from r802478, camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java
camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/resources/
- copied from r802478, camel/trunk/examples/camel-example-spring-jms/src/test/resources/
Modified:
camel/branches/camel-1.x/ (props changed)
camel/branches/camel-1.x/examples/camel-example-spring-jms/pom.xml
camel/branches/camel-1.x/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java
Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Aug 9 03:12:22 2009
@@ -1 +1 @@
-/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692,758990,759362,759453,759887,759931,760003,760890,760909,760937,761194,761536,761583,761607,762047,762633,762650,762935,763095,763484,763551,765154,765686,765729,765743,765824,766016,766289,766584,766588,766590,766602,766673,767403,767824,768342,769239,769346,769368,769434,770172,770906,771303,773193,773446,773781,774192,774383,774658-774659,776198,776289,776504,776975,778102,778689-778701,779121,779143,779489,781314-781349,781775,781
923,781974,781993,782557,782594,782681,782886,782918-782923,783204,783248,783363,783639,783704,785564,785584,785599,787206,787581,787598,787605,787928,788393,789121,789703,790560,790936,791379,791476,791767,792038,792381,792398,792899,793359,793518,793547-793555,793862,793935,794237,794368,794550,794967,795790,798027,798052,798063,798489,798864,799252,800340,800785,800797,801960,802307
+/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692,758990,759362,759453,759887,759931,760003,760890,760909,760937,761194,761536,761583,761607,762047,762633,762650,762935,763095,763484,763551,765154,765686,765729,765743,765824,766016,766289,766584,766588,766590,766602,766673,767403,767824,768342,769239,769346,769368,769434,770172,770906,771303,773193,773446,773781,774192,774383,774658-774659,776198,776289,776504,776975,778102,778689-778701,779121,779143,779489,781314-781349,781775,781
923,781974,781993,782557,782594,782681,782886,782918-782923,783204,783248,783363,783639,783704,785564,785584,785599,787206,787581,787598,787605,787928,788393,789121,789703,790560,790936,791379,791476,791767,792038,792381,792398,792899,793359,793518,793547-793555,793862,793935,794237,794368,794550,794967,795790,798027,798052,798063,798489,798864,799252,800340,800785,800797,801960,802307,802478
Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-1.x/examples/camel-example-spring-jms/pom.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/examples/camel-example-spring-jms/pom.xml?rev=802479&r1=802478&r2=802479&view=diff
==============================================================================
--- camel/branches/camel-1.x/examples/camel-example-spring-jms/pom.xml (original)
+++ camel/branches/camel-1.x/examples/camel-example-spring-jms/pom.xml Sun Aug 9 03:12:22 2009
@@ -94,9 +94,16 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
+
+ <!-- for testing -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
-
+
<profiles>
<profile>
<id>CamelServer</id>
@@ -148,7 +155,17 @@
<commandlineArgs>${target.cmd.args}</commandlineArgs>
</configuration>
</plugin>
-
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <forkMode>pertest</forkMode>
+ <childDelegation>false</childDelegation>
+ <useFile>true</useFile>
+ <includes>
+ <include>**/*Test.*</include>
+ </includes>
+ </configuration>
+ </plugin>
</plugins>
</build>
Modified: camel/branches/camel-1.x/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java?rev=802479&r1=802478&r2=802479&view=diff
==============================================================================
--- camel/branches/camel-1.x/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java (original)
+++ camel/branches/camel-1.x/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java Sun Aug 9 03:12:22 2009
@@ -36,7 +36,7 @@
ApplicationContext context = new ClassPathXmlApplicationContext("camel-client-remoting.xml");
// just get the proxy to the service and we as the client can use the "proxy" as it was
- // a local object we are invocing. Camel will under the covers do the remote communication
+ // a local object we are invoking. Camel will under the covers do the remote communication
// to the remote ActiveMQ server and fetch the response.
Multiplier multiplier = (Multiplier)context.getBean("multiplierProxy");
Copied: camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsAOPClientServerTest.java (from r802478, camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsAOPClientServerTest.java)
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsAOPClientServerTest.java?p2=camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsAOPClientServerTest.java&p1=camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsAOPClientServerTest.java&r1=802478&r2=802479&rev=802479&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsAOPClientServerTest.java (original)
+++ camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsAOPClientServerTest.java Sun Aug 9 03:12:22 2009
@@ -16,13 +16,12 @@
*/
package org.apache.camel.example;
-import org.junit.BeforeClass;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class SpringJmsAOPClientServerTest extends SpringJmsClientServerTest {
- @BeforeClass
- public static void setUpServer() {
+
+ public void setUpServer() {
serverContext = new ClassPathXmlApplicationContext("/META-INF/spring/camel-server-aop.xml");
}
Copied: camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java (from r802478, camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java)
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java?p2=camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java&p1=camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java&r1=802478&r2=802479&rev=802479&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java (original)
+++ camel/branches/camel-1.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java Sun Aug 9 03:12:22 2009
@@ -16,6 +16,7 @@
*/
package org.apache.camel.example;
+import junit.framework.TestCase;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
@@ -23,31 +24,34 @@
import org.apache.camel.Producer;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.example.server.Multiplier;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-public class SpringJmsClientServerTest extends Assert {
- protected static ConfigurableApplicationContext serverContext;
+public class SpringJmsClientServerTest extends TestCase {
+ protected ConfigurableApplicationContext serverContext;
- @BeforeClass
- public static void setUpServer() {
+
+ public void setUpServer() {
serverContext = new ClassPathXmlApplicationContext("/META-INF/spring/camel-server.xml");
}
- @AfterClass
- public static void tearDownServer() {
+
+ public void tearDownServer() {
if (serverContext != null) {
serverContext.stop();
}
}
- @Test
- public void testCamelClientInvocation() {
+ public void testAllClients() throws Exception {
+ setUpServer();
+ camelClientInvocation();
+ camelEndpointInvocation();
+ camelRemotingInvocation();
+ tearDownServer();
+ }
+
+ protected void camelClientInvocation() {
ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("camel-client.xml");
// get the camel template for Spring template style sending of messages (= producer)
@@ -62,8 +66,7 @@
}
- @Test
- public void testCamelEndpointInvocation() throws Exception {
+ protected void camelEndpointInvocation() throws Exception {
ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("camel-client.xml");
CamelContext camel = (CamelContext) context.getBean("camel");
@@ -98,8 +101,7 @@
}
- @Test
- public void testCamelRemotingInvocation() {
+ protected void camelRemotingInvocation() {
ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("camel-client-remoting.xml");
// just get the proxy to the service and we as the client can use the "proxy" as it was