You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/10/06 07:39:28 UTC

[camel-quarkus] branch master updated: Fix #133 Test netty4-http as a producer

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/master by this push:
     new 3821fca  Fix #133 Test netty4-http as a producer
     new 8100e8c  Merge pull request #134 from ppalaga/i133
3821fca is described below

commit 3821fcaacffb55b693e7e60d8d6258c8471ef568
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Aug 13 22:19:56 2019 +0200

    Fix #133 Test netty4-http as a producer
---
 .../camel/quarkus/component/netty/http/CamelRoute.java    |  5 +++++
 .../camel/quarkus/component/netty/http/CamelTest.java     | 15 ++++++++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/integration-tests/netty-http/src/main/java/org/apache/camel/quarkus/component/netty/http/CamelRoute.java b/integration-tests/netty-http/src/main/java/org/apache/camel/quarkus/component/netty/http/CamelRoute.java
index 2e9a08a..ad40628 100644
--- a/integration-tests/netty-http/src/main/java/org/apache/camel/quarkus/component/netty/http/CamelRoute.java
+++ b/integration-tests/netty-http/src/main/java/org/apache/camel/quarkus/component/netty/http/CamelRoute.java
@@ -19,10 +19,15 @@ package org.apache.camel.quarkus.component.netty.http;
 import org.apache.camel.builder.RouteBuilder;
 
 public class CamelRoute extends RouteBuilder {
+
     @Override
     public void configure() {
         from("netty-http:http://0.0.0.0:8999/foo")
             .transform().constant("Netty Hello World");
 
+        /* /producer proxying /foo */
+        from("netty-http:http://0.0.0.0:8999/producer")
+            .to("netty-http:http://localhost:8999/foo");
+
     }
 }
diff --git a/integration-tests/netty-http/src/test/java/org/apache/camel/quarkus/component/netty/http/CamelTest.java b/integration-tests/netty-http/src/test/java/org/apache/camel/quarkus/component/netty/http/CamelTest.java
index 3a6bf92..35b888b 100644
--- a/integration-tests/netty-http/src/test/java/org/apache/camel/quarkus/component/netty/http/CamelTest.java
+++ b/integration-tests/netty-http/src/test/java/org/apache/camel/quarkus/component/netty/http/CamelTest.java
@@ -16,18 +16,27 @@
  */
 package org.apache.camel.quarkus.component.netty.http;
 
+import static org.hamcrest.Matchers.is;
+
 import java.net.URI;
 
-import io.quarkus.test.junit.QuarkusTest;
-import io.restassured.RestAssured;
 import org.junit.jupiter.api.Test;
 
-import static org.hamcrest.Matchers.is;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
 
 @QuarkusTest
 public class CamelTest {
+
     @Test
     public void testNetty4Http() throws Exception {
         RestAssured.when().get(new URI("http://localhost:8999/foo")).then().body(is("Netty Hello World"));
     }
+
+    @Test
+    public void netty4HttpProducer() throws Exception {
+        RestAssured.when().get(new URI("http://localhost:8999/producer")) //
+            .then().statusCode(200).body(is("Netty Hello World"));
+    }
+
 }