Return-Path: Delivered-To: apmail-camel-commits-archive@www.apache.org Received: (qmail 21461 invoked from network); 12 May 2009 08:18:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 May 2009 08:18:15 -0000 Received: (qmail 21996 invoked by uid 500); 12 May 2009 08:18:15 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 21950 invoked by uid 500); 12 May 2009 08:18:15 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 21934 invoked by uid 99); 12 May 2009 08:18:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 May 2009 08:18:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 May 2009 08:18:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4F1202388842; Tue, 12 May 2009 08:17:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r773819 - in /camel/trunk/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:17:53 -0000 To: commits@camel.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090512081753.4F1202388842@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ningjiang Date: Tue May 12 08:17:52 2009 New Revision: 773819 URL: http://svn.apache.org/viewvc?rev=773819&view=rev Log: CAMEL-1603 Fixed the Camel-HL7 tests failures on Windows Modified: camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecLongTest.java camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecPlainStringTest.java camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java Modified: camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecLongTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecLongTest.java?rev=773819&r1=773818&r2=773819&view=diff ============================================================================== --- camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecLongTest.java (original) +++ camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecLongTest.java Tue May 12 08:17:52 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/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecPlainStringTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecPlainStringTest.java?rev=773819&r1=773818&r2=773819&view=diff ============================================================================== --- camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecPlainStringTest.java (original) +++ camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecPlainStringTest.java Tue May 12 08:17:52 2009 @@ -46,7 +46,7 @@ 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"); assertMockEndpointsSatisfied(); @@ -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/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java?rev=773819&r1=773818&r2=773819&view=diff ============================================================================== --- camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java (original) +++ camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java Tue May 12 08:17:52 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/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java?rev=773819&r1=773818&r2=773819&view=diff ============================================================================== --- camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java (original) +++ camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java Tue May 12 08:17:52 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("\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()); // END SNIPPET: e2 String[] lines = out.split("\r"); Modified: camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java?rev=773819&r1=773818&r2=773819&view=diff ============================================================================== --- camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java (original) +++ camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java Tue May 12 08:17:52 2009 @@ -62,7 +62,7 @@ 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]); @@ -84,7 +84,7 @@ 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]); @@ -105,7 +105,7 @@ 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()); assertMockEndpointsSatisfied(); } @@ -117,7 +117,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)