servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r1139306 - /servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/
Date Fri, 24 Jun 2011 13:48:14 GMT
Author: jbonofre
Date: Fri Jun 24 13:48:14 2011
New Revision: 1139306

URL: http://svn.apache.org/viewvc?rev=1139306&view=rev
Log:
[SMXCOMP-875] In preparation for Camel 2.8.0 update, refactoring of the exception handling
to remove deprecated methods usage.

Modified:
    servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyAsyncCamelTest.java
    servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyCamelErrorHandlingTest.java
    servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
    servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutCamelErrorHandlingTest.java
    servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutCamelJMSFlowExceptionTest.java
    servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiTryCatchExceptionTest.java

Modified: servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyAsyncCamelTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyAsyncCamelTest.java?rev=1139306&r1=1139305&r2=1139306&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyAsyncCamelTest.java
(original)
+++ servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyAsyncCamelTest.java
Fri Jun 24 13:48:14 2011
@@ -65,7 +65,7 @@ public class JbiInOnlyAsyncCamelTest ext
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                errorHandler(deadLetterChannel("mock:dlc").maximumRedeliveries(0).handled(false));
+                onException().to("mock:dlc").maximumRedeliveries(0).handled(false);
 
                 from("jbi:service:urn:test:in-only")
                     .threads(1)

Modified: servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyCamelErrorHandlingTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyCamelErrorHandlingTest.java?rev=1139306&r1=1139305&r2=1139306&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyCamelErrorHandlingTest.java
(original)
+++ servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyCamelErrorHandlingTest.java
Fri Jun 24 13:48:14 2011
@@ -173,7 +173,8 @@ public class JbiInOnlyCamelErrorHandling
             public void configure() throws Exception {
                 onException(IllegalStateException.class).handled(false).to("jbi:service:urn:test:receiver-service");
                 onException(NullPointerException.class).handled(true).to("jbi:service:urn:test:receiver-service");
-                errorHandler(deadLetterChannel("mock:errors").maximumRedeliveries(1).redeliverDelay(300).handled(false));
+                onException().handled(false);
+                errorHandler(deadLetterChannel("mock:errors").maximumRedeliveries(1).maximumRedeliveryDelay(300));
                 from("jbi:service:urn:test:no-handle-fault").to("jbi:service:urn:test:faulty-service");
                 from("jbi:service:urn:test:handle-fault").handleFault().to("jbi:service:urn:test:faulty-service");
                 from("jbi:service:urn:test:error-not-handled").to("jbi:service:urn:test:iae-error-service");

Modified: servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java?rev=1139306&r1=1139305&r2=1139306&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
(original)
+++ servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
Fri Jun 24 13:48:14 2011
@@ -115,7 +115,7 @@ public class JbiInOnlyTest extends JbiTe
             @Override
             public void configure() throws Exception {
                 // let's not retry things too often as this will only slow down the unit
tests
-                errorHandler(deadLetterChannel("mock:errors").maximumRedeliveries(0).handled(false));
                           
+                onException().to("mock:errors").maximumRedeliveries(0).handled(false);
                 
                 from("jbi:service:urn:test:forward").to("jbi:service:urn:test:in-only?mep=in-only");
                 from("jbi:service:urn:test:in-only").convertBodyTo(String.class).to("mock:done");

Modified: servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutCamelErrorHandlingTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutCamelErrorHandlingTest.java?rev=1139306&r1=1139305&r2=1139306&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutCamelErrorHandlingTest.java
(original)
+++ servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutCamelErrorHandlingTest.java
Fri Jun 24 13:48:14 2011
@@ -137,7 +137,8 @@ public class JbiInOutCamelErrorHandlingT
                 onException(IllegalStateException.class).handled(false).to("jbi:service:urn:test:receiver-service?mep=in-only");
                 onException(NullPointerException.class).handled(true).to("jbi:service:urn:test:receiver-service?mep=in-only");
                 onException(FaultException.class).handled(true).to("mock:faults-handled");
-                errorHandler(deadLetterChannel("mock:errors").maximumRedeliveries(1).redeliverDelay(300).handled(false));
+                onException().handled(false);
+                errorHandler(deadLetterChannel("mock:errors").maximumRedeliveries(1).maximumRedeliveryDelay(300));
                 from("jbi:service:urn:test:no-handle-fault").to("jbi:service:urn:test:faulty-service");
                 from("jbi:service:urn:test:handle-fault").handleFault().to("jbi:service:urn:test:faulty-service");
                 from("jbi:service:urn:test:error-not-handled").to("jbi:service:urn:test:iae-error-service");

Modified: servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutCamelJMSFlowExceptionTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutCamelJMSFlowExceptionTest.java?rev=1139306&r1=1139305&r2=1139306&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutCamelJMSFlowExceptionTest.java
(original)
+++ servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutCamelJMSFlowExceptionTest.java
Fri Jun 24 13:48:14 2011
@@ -87,8 +87,7 @@ public class JbiInOutCamelJMSFlowExcepti
             public void configure() throws Exception {
                 onException(org.apache.camel.processor.validation.SchemaValidationException.class).handled(false);
                 onException(org.apache.camel.CamelException.class).handled(true);
-                errorHandler(
-                    deadLetterChannel("mock:errors").maximumRedeliveries(1).redeliverDelay(300).handled(false));
+                errorHandler(deadLetterChannel("mock:errors").maximumRedeliveries(1).maximumRedeliveryDelay(300));
                 from("jbi:service:urn:test:error-not-handled?convertExceptions=true")
                     .to("validator:org/apache/servicemix/camel/simple.xsd");
                 from("jbi:service:urn:test:error-handled-true")

Modified: servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiTryCatchExceptionTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiTryCatchExceptionTest.java?rev=1139306&r1=1139305&r2=1139306&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiTryCatchExceptionTest.java
(original)
+++ servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiTryCatchExceptionTest.java
Fri Jun 24 13:48:14 2011
@@ -50,7 +50,8 @@ public class JbiTryCatchExceptionTest ex
             @Override
             public void configure() throws Exception {
                 // let's not retry things too often as this will only slow down the unit
tests
-                errorHandler(deadLetterChannel("mock:errors").maximumRedeliveries(0).handled(false));
+                onException().to("mock:errors").maximumRedeliveries(0);
+                errorHandler(deadLetterChannel("mock:errors"));
 
                 // throwing an exception from within the Camel route
                 from("jbi:endpoint:urn:test:throwsException")



Mime
View raw message