camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r773824 - in /camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7: HL7MLLPCodecLongTest.java HL7MLLPCodecPlainStringTest.java HL7MLLPCodecStandAndEndBytesTest.java HL7MLLPCodecTest.java HL7RouteTest.java
Date Tue, 12 May 2009 08:48:28 GMT
Author: ningjiang
Date: Tue May 12 08:48:28 2009
New Revision: 773824

URL: http://svn.apache.org/viewvc?rev=773824&view=rev
Log:
CAMEL-1603 Fixed the Camel-HL7 tests failures on Windows

Modified:
    camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecLongTest.java
    camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecPlainStringTest.java
    camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java
    camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java
    camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java

Modified: camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecLongTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecLongTest.java?rev=773824&r1=773823&r2=773824&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecLongTest.java
(original)
+++ camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecLongTest.java
Tue May 12 08:48:28 2009
@@ -51,7 +51,7 @@
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("mina:tcp://0.0.0.0:8888?sync=true&codec=hl7codec").process(new
Processor() {
+                from("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec").process(new
Processor() {
                     public void process(Exchange exchange) throws Exception {
                         assertEquals(70010, exchange.getIn().getBody().toString().length());
                         MDM_T02 input = (MDM_T02)exchange.getIn().getBody(Message.class);
@@ -77,7 +77,7 @@
         }
         message = message.substring(0, message.length() - 1);
         assertEquals(70010, message.length());
-        String out = (String)template.requestBody("mina:tcp://0.0.0.0:8888?sync=true&codec=hl7codec",
message);
+        String out = (String)template.requestBody("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec",
message);
         assertEquals("some response", out);
         // END SNIPPET: e2
     }

Modified: camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecPlainStringTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecPlainStringTest.java?rev=773824&r1=773823&r2=773824&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecPlainStringTest.java
(original)
+++ camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecPlainStringTest.java
Tue May 12 08:48:28 2009
@@ -46,9 +46,9 @@
         mock.expectedBodiesReceived("Bye World");
 
         // send plain hello world as String
-        Object out = template.requestBody("mina:tcp://0.0.0.0:8888?sync=true&codec=hl7codec",
"Hello World");
+        Object out = template.requestBody("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec",
"Hello World");
 
-        assertMockEndpointsSatisifed();
+        assertMockEndpointsSatisfied();
 
         // and the response is also just plain String
         assertEquals("Bye World", out);
@@ -59,7 +59,7 @@
         return new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: e2
-                from("mina:tcp://0.0.0.0:8888?sync=true&codec=hl7codec")
+                from("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec")
                     .process(new Processor() {
                         public void process(Exchange exchange) throws Exception {
                             // use plain String as message format

Modified: camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java?rev=773824&r1=773823&r2=773824&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java
(original)
+++ camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java
Tue May 12 08:48:28 2009
@@ -52,7 +52,7 @@
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("mina:tcp://0.0.0.0:8888?sync=true&codec=hl7codec")
+                from("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec")
                     .process(new Processor() {
                         public void process(Exchange exchange) throws Exception {
                             Message input = exchange.getIn().getBody(Message.class);
@@ -79,7 +79,7 @@
         in.append("\r");
         in.append(line2);
 
-        String out = (String)template.requestBody("mina:tcp://0.0.0.0:8888?sync=true&codec=hl7codec",
in.toString());
+        String out = (String)template.requestBody("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec",
in.toString());
 
         String[] lines = out.split("\r");
         assertEquals("MSH|^~\\&|MYSENDER||||200701011539||ADR^A19||||123", lines[0]);

Modified: camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java?rev=773824&r1=773823&r2=773824&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java
(original)
+++ camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java
Tue May 12 08:48:28 2009
@@ -49,7 +49,7 @@
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("mina:tcp://0.0.0.0:8888?sync=true&codec=hl7codec")
+                from("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec")
                     .process(new Processor() {
                         public void process(Exchange exchange) throws Exception {
                             Message input = exchange.getIn().getBody(Message.class);
@@ -77,7 +77,7 @@
         in.append("\r");
         in.append(line2);
 
-        String out = (String)template.requestBody("mina:tcp://0.0.0.0:8888?sync=true&codec=hl7codec",
in.toString());
+        String out = (String)template.requestBody("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec",
in.toString());
         // END SNIPPET: e2
 
         String[] lines = out.split("\r");

Modified: camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java?rev=773824&r1=773823&r2=773824&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java
(original)
+++ camel/branches/camel-1.x/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java
Tue May 12 08:48:28 2009
@@ -64,13 +64,13 @@
         in.append("\n");
         in.append(line2);
 
-        String out = (String) template.requestBody("mina:tcp://0.0.0.0:8888?sync=true&codec=hl7codec",
in.toString());
+        String out = (String) template.requestBody("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec",
in.toString());
 
         String[] lines = out.split("\r");
         assertEquals("MSH|^~\\&|MYSENDER||||200701011539||ADR^A19||||123", lines[0]);
         assertEquals("MSA|AA|123", lines[1]);
 
-        assertMockEndpointsSatisifed();
+        assertMockEndpointsSatisfied();
     }
 
     public void testSendA01() throws Exception {
@@ -86,12 +86,12 @@
         in.append("\n");
         in.append(line2);
 
-        String out = (String) template.requestBody("mina:tcp://0.0.0.0:8888?sync=true&codec=hl7codec",
in.toString());
+        String out = (String) template.requestBody("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec",
in.toString());
         String[] lines = out.split("\r");
         assertEquals("MSH|^~\\&|MYSENDER||||200701011539||ADT^A01||||123", lines[0]);
         assertEquals("PID|||123456||Doe^John", lines[1]);
 
-        assertMockEndpointsSatisifed();
+        assertMockEndpointsSatisfied();
     }
 
     public void testSendUnknown() throws Exception {
@@ -107,9 +107,9 @@
         in.append("\n");
         in.append(line2);
 
-        template.requestBody("mina:tcp://0.0.0.0:8888?sync=true&codec=hl7codec", in.toString());
+        template.requestBody("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec", in.toString());
 
-        assertMockEndpointsSatisifed();
+        assertMockEndpointsSatisfied();
     }
 
     @Override
@@ -119,7 +119,7 @@
                 // START SNIPPET: e1
                 DataFormat hl7 = new HL7DataFormat();
                 // we setup or HL7 listener on port 8888 (using the hl7codec) and in sync
mode so we can return a response
-                from("mina:tcp://0.0.0.0:8888?sync=true&codec=hl7codec")
+                from("mina:tcp://127.0.0.1:8888?sync=true&codec=hl7codec")
                     // we use the HL7 data format to unmarshal from HL7 stream to the HAPI
Message model
                     // this ensures that the camel message has been enriched with hl7 specific
headers to
                     // make the routing much easier (see below)



Mime
View raw message