camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r774810 - in /camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest: jetty/JettyFileMulticastTest.java tx/JmsToHttpWithOnExceptionAndNoTransactionErrorHandlerConfiguredRoute.java tx/JmsToHttpWithOnExceptionRoute.java
Date Thu, 14 May 2009 15:15:32 GMT
Author: ningjiang
Date: Thu May 14 15:15:31 2009
New Revision: 774810

URL: http://svn.apache.org/viewvc?rev=774810&view=rev
Log:
CAMEL-1594 Fixed the itest error

Modified:
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyFileMulticastTest.java
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpWithOnExceptionAndNoTransactionErrorHandlerConfiguredRoute.java
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpWithOnExceptionRoute.java

Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyFileMulticastTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyFileMulticastTest.java?rev=774810&r1=774809&r2=774810&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyFileMulticastTest.java
(original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyFileMulticastTest.java
Thu May 14 15:15:31 2009
@@ -58,8 +58,8 @@
         assertEquals("Should get one message for mock endpoint", resultExchanges.size(),
1);
         
         String result = resultExchanges.get(0).getIn().getBody(String.class);
-        assertEquals("Should get the request", "<response>Hello form Willem</response>",
result);
-        assertEquals("Should get the header", "greetMe", resultExchanges.get(0).getIn().getHeader("Operation"));
       
+        assertEquals("Should get the request", "<response>Hello form Willem</response>",
result);        
+        assertEquals("Should get the responise code", 200, resultExchanges.get(0).getIn().getHeader(Exchange.HTTP_RESPONSE_CODE));
       
         
     }
 

Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpWithOnExceptionAndNoTransactionErrorHandlerConfiguredRoute.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpWithOnExceptionAndNoTransactionErrorHandlerConfiguredRoute.java?rev=774810&r1=774809&r2=774810&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpWithOnExceptionAndNoTransactionErrorHandlerConfiguredRoute.java
(original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpWithOnExceptionAndNoTransactionErrorHandlerConfiguredRoute.java
Thu May 14 15:15:31 2009
@@ -71,7 +71,7 @@
                 // first hit is always a error code 500 to force the caller to retry
                 if (counter++ < 1) {
                     // simulate http error 500
-                    exchange.getOut().setHeader(HttpConstants.HTTP_RESPONSE_CODE, 500);
+                    exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 500);
                     exchange.getOut().setBody("Damn some internal server error");
                     return;
                 }
@@ -79,7 +79,7 @@
                 String user = exchange.getIn().getHeader("user", String.class);
                 if ("unknown".equals(user)) {
                     // no page for a unknown user
-                    exchange.getOut().setHeader(HttpConstants.HTTP_RESPONSE_CODE, 404);
+                    exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 404);
                     exchange.getOut().setBody("Page does not exists");
                     return;
                 } else if ("guest".equals(user)) {

Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpWithOnExceptionRoute.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpWithOnExceptionRoute.java?rev=774810&r1=774809&r2=774810&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpWithOnExceptionRoute.java
(original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpWithOnExceptionRoute.java
Thu May 14 15:15:31 2009
@@ -74,7 +74,7 @@
                 // first hit is always a error code 500 to force the caller to retry
                 if (counter++ < 1) {
                     // simulate http error 500
-                    exchange.getOut().setHeader(HttpConstants.HTTP_RESPONSE_CODE, 500);
+                    exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 500);
                     exchange.getOut().setBody("Damn some internal server error");
                     return;
                 }
@@ -82,7 +82,7 @@
                 String user = exchange.getIn().getHeader("user", String.class);
                 if ("unknown".equals(user)) {
                     // no page for a unknown user
-                    exchange.getOut().setHeader(HttpConstants.HTTP_RESPONSE_CODE, 404);
+                    exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 404);
                     exchange.getOut().setBody("Page does not exists");
                     return;
                 } else if ("guest".equals(user)) {



Mime
View raw message