camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1398760 - in /camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty: NettyUDPAsyncTest.java NettyUDPObjectSyncTest.java NettyUDPSyncTest.java
Date Tue, 16 Oct 2012 12:34:35 GMT
Author: davsclaus
Date: Tue Oct 16 12:34:34 2012
New Revision: 1398760

URL: http://svn.apache.org/viewvc?rev=1398760&view=rev
Log:
Fixed test to shutdown faster.

Modified:
    camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java
    camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java
    camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java

Modified: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java?rev=1398760&r1=1398759&r2=1398760&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java
(original)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java
Tue Oct 16 12:34:34 2012
@@ -23,24 +23,19 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.converter.IOConverter;
 import org.apache.camel.util.IOHelper;
-
 import org.junit.Test;
 
 public class NettyUDPAsyncTest extends BaseNettyTest {
 
     @EndpointInject(uri = "mock:result")
     protected MockEndpoint resultEndpoint;
-    @Produce(uri = "direct:start")
-    protected ProducerTemplate producerTemplate;
-    
+
     private void sendFile(String uri) throws Exception {
-        producerTemplate.send(uri, new Processor() {
+        template.send(uri, new Processor() {
             public void process(Exchange exchange) throws Exception {
                 // Read from an input stream
                 InputStream is = IOHelper.buffered(new FileInputStream("./src/test/resources/test.txt"));

Modified: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java?rev=1398760&r1=1398759&r2=1398760&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java
(original)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java
Tue Oct 16 12:34:34 2012
@@ -18,20 +18,15 @@ package org.apache.camel.component.netty
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.Test;
 
 public class NettyUDPObjectSyncTest extends BaseNettyTest {
 
-    @Produce(uri = "direct:start")
-    protected ProducerTemplate producerTemplate;
-    
     @Test
     public void testUDPObjectInOutWithNettyConsumer() throws Exception {
         Poetry poetry = new Poetry();
-        Poetry response = producerTemplate.requestBody("netty:udp://localhost:{{port}}?sync=true",
poetry, Poetry.class);
+        Poetry response = template.requestBody("netty:udp://localhost:{{port}}?sync=true",
poetry, Poetry.class);
         assertEquals("Dr. Sarojini Naidu", response.getPoet());
     }
     

Modified: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java?rev=1398760&r1=1398759&r2=1398760&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java
(original)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java
Tue Oct 16 12:34:34 2012
@@ -18,20 +18,15 @@ package org.apache.camel.component.netty
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.Test;
 
 public class NettyUDPSyncTest extends BaseNettyTest {
 
-    @Produce(uri = "direct:start")
-    protected ProducerTemplate producerTemplate;
-
     @Test
     public void testUDPStringInOutWithNettyConsumer() throws Exception {
         for (int i = 0; i < 5; i++) {
-            String response = producerTemplate.requestBody(
+            String response = template.requestBody(
                 "netty:udp://localhost:{{port}}?sync=true",
                 "After the Battle of Thermopylae in 480 BC - Simonides of Ceos (c. 556 BC-468
BC), Greek lyric poet wrote ?", String.class);        
             assertEquals("Go tell the Spartans, thou that passest by, That faithful to their
precepts here we lie.", response);



Mime
View raw message