camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r790780 - in /camel/branches/camel-1.x: ./ etc/eclipse/ tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/
Date Fri, 03 Jul 2009 02:43:06 GMT
Author: ningjiang
Date: Fri Jul  3 02:43:06 2009
New Revision: 790780

URL: http://svn.apache.org/viewvc?rev=790780&view=rev
Log:
Merged revisions 790560 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r790560 | davsclaus | 2009-07-02 20:17:51 +0800 (Thu, 02 Jul 2009) | 1 line
  
  Fixed some unit tests reported by TC.
........

Removed:
    camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/HttpClient.java
Modified:
    camel/branches/camel-1.x/   (props changed)
    camel/branches/camel-1.x/etc/eclipse/Camel.importorder   (props changed)
    camel/branches/camel-1.x/etc/eclipse/CamelCodeFormatter.xml   (props changed)
    camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyValidatorStreamTest.java
    camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyValidatorTest.java

Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul  3 02:43:06 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
+/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

Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Propchange: camel/branches/camel-1.x/etc/eclipse/Camel.importorder
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul  3 02:43:06 2009
@@ -0,0 +1 @@
+/camel/trunk/etc/eclipse/Camel.importorder:790560

Propchange: camel/branches/camel-1.x/etc/eclipse/CamelCodeFormatter.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul  3 02:43:06 2009
@@ -0,0 +1 @@
+/camel/trunk/etc/eclipse/CamelCodeFormatter.xml:790560

Modified: camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyValidatorStreamTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyValidatorStreamTest.java?rev=790780&r1=790779&r2=790780&view=diff
==============================================================================
--- camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyValidatorStreamTest.java
(original)
+++ camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyValidatorStreamTest.java
Fri Jul  3 02:43:06 2009
@@ -20,6 +20,7 @@
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.converter.IOConverter;
 
 /**
  * @version $Revision$
@@ -27,10 +28,11 @@
 public class JettyValidatorStreamTest extends ContextTestSupport {
 
     public void testValideRequestAsStream() throws Exception {
-        InputStream inputStream = HttpClient.class.getResourceAsStream("ValidRequest.xml");
+        InputStream inputStream = this.getClass().getResourceAsStream("ValidRequest.xml");
         assertNotNull("the inputStream should not be null", inputStream);
-        String response = HttpClient.send(inputStream);
-        assertEquals("The response should be ok", response, "<ok/>");
+
+        InputStream response = (InputStream) template.requestBody("http://localhost:8192/test",
inputStream);
+        assertEquals("The response should be ok", IOConverter.toString(response), "<ok/>");
     }
 
     @Override

Modified: camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyValidatorTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyValidatorTest.java?rev=790780&r1=790779&r2=790780&view=diff
==============================================================================
--- camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyValidatorTest.java
(original)
+++ camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/jetty/JettyValidatorTest.java
Fri Jul  3 02:43:06 2009
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.itest.jetty;
 
+import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Map;
@@ -26,21 +27,25 @@
 import org.apache.camel.Processor;
 import org.apache.camel.ValidationException;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.converter.IOConverter;
 
 public class JettyValidatorTest extends ContextTestSupport {
 
     public void testValideRequest() throws Exception {
-        InputStream inputStream = HttpClient.class.getResourceAsStream("ValidRequest.xml");
+        InputStream inputStream = this.getClass().getResourceAsStream("ValidRequest.xml");
         assertNotNull("the inputStream should not be null", inputStream);
-        String response = HttpClient.send(inputStream);
-        assertEquals("The response should be ok", response, "<ok/>");
+
+        InputStream response = (InputStream) template.requestBody("http://localhost:8192/test",
inputStream);
+
+        assertEquals("The response should be ok", IOConverter.toString(response), "<ok/>");
     }
 
     public void testInvalideRequest() throws Exception {
-        InputStream inputStream = HttpClient.class.getResourceAsStream("InvalidRequest.xml");
+        InputStream inputStream = this.getClass().getResourceAsStream("InvalidRequest.xml");
         assertNotNull("the inputStream should not be null", inputStream);
-        String response = HttpClient.send(inputStream);
-        assertEquals("The response should be error", response, "<error/>");
+
+        InputStream response = (InputStream) template.requestBody("http://localhost:8192/test",
inputStream);
+        assertEquals("The response should be error", IOConverter.toString(response), "<error/>");
     }
 
     @Override



Mime
View raw message