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 01cbb6c Move netty integration-tests out of core #32 new bcd4441 Merge pull request #79 from lburgazzoli/github-32 01cbb6c is described below commit 01cbb6cdda38eb29ffee1984b6d5586813e442bf Author: lburgazzoli <lburgazz...@gmail.com> AuthorDate: Sun Jul 21 17:38:22 2019 +0200 Move netty integration-tests out of core #32 --- integration-tests/core/pom.xml | 4 --- .../java/io/quarkus/it/camel/core/CamelRoute.java | 3 -- .../java/io/quarkus/it/camel/core/CamelTest.java | 17 +++------ integration-tests/{core => netty4-http}/pom.xml | 19 ++++------ .../io/quarkus/it/camel/nett4http/CamelRoute.java} | 42 ++++++++++------------ .../src/main/resources/application.properties | 36 +++++++++++++++++++ .../io/quarkus/it/camel/nett4http/CamelITCase.java | 23 ++++++++++++ .../io/quarkus/it/camel/nett4http}/CamelTest.java | 12 +------ integration-tests/pom.xml | 1 + 9 files changed, 90 insertions(+), 67 deletions(-) diff --git a/integration-tests/core/pom.xml b/integration-tests/core/pom.xml index ddad477..56e4c00 100644 --- a/integration-tests/core/pom.xml +++ b/integration-tests/core/pom.xml @@ -43,10 +43,6 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-netty4-http</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-timer</artifactId> </dependency> diff --git a/integration-tests/core/src/main/java/io/quarkus/it/camel/core/CamelRoute.java b/integration-tests/core/src/main/java/io/quarkus/it/camel/core/CamelRoute.java index c6b8436..9ee0422 100644 --- a/integration-tests/core/src/main/java/io/quarkus/it/camel/core/CamelRoute.java +++ b/integration-tests/core/src/main/java/io/quarkus/it/camel/core/CamelRoute.java @@ -57,9 +57,6 @@ public class CamelRoute extends RouteBuilder { // log out .to("log:out"); - from("netty4-http:http://0.0.0.0:8999/foo") - .transform().constant("Netty Hello World"); - } public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { diff --git a/integration-tests/core/src/test/java/io/quarkus/it/camel/core/CamelTest.java b/integration-tests/core/src/test/java/io/quarkus/it/camel/core/CamelTest.java index 7281cd1..d12b2ff 100644 --- a/integration-tests/core/src/test/java/io/quarkus/it/camel/core/CamelTest.java +++ b/integration-tests/core/src/test/java/io/quarkus/it/camel/core/CamelTest.java @@ -16,16 +16,12 @@ */ package io.quarkus.it.camel.core; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.is; - -import java.net.URI; - -import org.junit.jupiter.api.Test; - -import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.restassured.RestAssured; +import org.junit.jupiter.api.Test; + +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.is; @QuarkusTest public class CamelTest { @@ -38,9 +34,4 @@ public class CamelTest { public void testProperties() { RestAssured.when().get("/test/property/camel.context.name").then().body(is("quarkus-camel-example")); } - - @Test - public void testNetty4Http() throws Exception { - RestAssured.when().get(new URI("http://localhost:8999/foo")).then().body(is("Netty Hello World")); - } } diff --git a/integration-tests/core/pom.xml b/integration-tests/netty4-http/pom.xml similarity index 91% copy from integration-tests/core/pom.xml copy to integration-tests/netty4-http/pom.xml index ddad477..d99ede6 100644 --- a/integration-tests/core/pom.xml +++ b/integration-tests/netty4-http/pom.xml @@ -27,8 +27,8 @@ </parent> <modelVersion>4.0.0</modelVersion> - <artifactId>camel-quarkus-integration-test-core</artifactId> - <name>Camel Quarkus :: Integration Tests :: Core</name> + <artifactId>camel-quarkus-integration-test-netty4-http</artifactId> + <name>Camel Quarkus :: Integration Tests :: Nett4 Http</name> <description>The camel integration tests</description> @@ -39,23 +39,16 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-log</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-netty4-http</artifactId> </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-timer</artifactId> - </dependency> + <!-- Undertow is here only for the test runner to be able to detect that the server has started --> <dependency> <groupId>io.quarkus</groupId> - <artifactId>quarkus-resteasy</artifactId> - </dependency> + <artifactId>quarkus-undertow</artifactId> + </dependency><![CDATA[ - <!-- test dependencies --> + ]]><!-- test dependencies --> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> diff --git a/integration-tests/core/src/test/java/io/quarkus/it/camel/core/CamelTest.java b/integration-tests/netty4-http/src/main/java/io/quarkus/it/camel/nett4http/CamelRoute.java similarity index 50% copy from integration-tests/core/src/test/java/io/quarkus/it/camel/core/CamelTest.java copy to integration-tests/netty4-http/src/main/java/io/quarkus/it/camel/nett4http/CamelRoute.java index 7281cd1..33fbd02 100644 --- a/integration-tests/core/src/test/java/io/quarkus/it/camel/core/CamelTest.java +++ b/integration-tests/netty4-http/src/main/java/io/quarkus/it/camel/nett4http/CamelRoute.java @@ -14,33 +14,29 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.quarkus.it.camel.core; +package io.quarkus.it.camel.netty4http; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.is; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; -import java.net.URI; +import org.apache.camel.AsyncCallback; +import org.apache.camel.AsyncProcessor; +import org.apache.camel.Exchange; +import org.apache.camel.Processor; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.bean.BeanProcessor; +import org.apache.camel.support.DefaultExchange; -import org.junit.jupiter.api.Test; +import io.quarkus.runtime.annotations.RegisterForReflection; -import io.quarkus.test.common.QuarkusTestResource; -import io.quarkus.test.junit.QuarkusTest; -import io.restassured.RestAssured; +public class CamelRoute extends RouteBuilder { + @Override + public void configure() { + from("netty4-http:http://0.0.0.0:8999/foo") + .transform().constant("Netty Hello World"); -@QuarkusTest -public class CamelTest { - @Test - public void testRoutes() { - RestAssured.when().get("/test/routes").then().body(containsString("timer")); - } - - @Test - public void testProperties() { - RestAssured.when().get("/test/property/camel.context.name").then().body(is("quarkus-camel-example")); - } - - @Test - public void testNetty4Http() throws Exception { - RestAssured.when().get(new URI("http://localhost:8999/foo")).then().body(is("Netty Hello World")); } } diff --git a/integration-tests/netty4-http/src/main/resources/application.properties b/integration-tests/netty4-http/src/main/resources/application.properties new file mode 100644 index 0000000..c1ba322 --- /dev/null +++ b/integration-tests/netty4-http/src/main/resources/application.properties @@ -0,0 +1,36 @@ +## --------------------------------------------------------------------------- +## Licensed to the Apache Software Foundation (ASF) under one or more +## contributor license agreements. See the NOTICE file distributed with +## this work for additional information regarding copyright ownership. +## The ASF licenses this file to You under the Apache License, Version 2.0 +## (the "License"); you may not use this file except in compliance with +## the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## --------------------------------------------------------------------------- +# +# Quarkus +# +quarkus.log.file.enable = false + +# +# Camel +# +quarkus.camel.disable-xml=true +quarkus.camel.disable-jaxb=true + +camel.context.name=quarkus-camel-example +camel.context.loadTypeConverters=false + +camel.routes.dump=true +camel.routes.defer=true +camel.routes.locations= + +camel.component.properties.prefixToken={{ +camel.component.properties.suffixToken=}} diff --git a/integration-tests/netty4-http/src/test/java/io/quarkus/it/camel/nett4http/CamelITCase.java b/integration-tests/netty4-http/src/test/java/io/quarkus/it/camel/nett4http/CamelITCase.java new file mode 100644 index 0000000..ea175b8 --- /dev/null +++ b/integration-tests/netty4-http/src/test/java/io/quarkus/it/camel/nett4http/CamelITCase.java @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.quarkus.it.camel.netty4http; + +import io.quarkus.test.junit.SubstrateTest; + +@SubstrateTest +public class CamelITCase extends CamelTest { +} diff --git a/integration-tests/core/src/test/java/io/quarkus/it/camel/core/CamelTest.java b/integration-tests/netty4-http/src/test/java/io/quarkus/it/camel/nett4http/CamelTest.java similarity index 79% copy from integration-tests/core/src/test/java/io/quarkus/it/camel/core/CamelTest.java copy to integration-tests/netty4-http/src/test/java/io/quarkus/it/camel/nett4http/CamelTest.java index 7281cd1..da13458 100644 --- a/integration-tests/core/src/test/java/io/quarkus/it/camel/core/CamelTest.java +++ b/integration-tests/netty4-http/src/test/java/io/quarkus/it/camel/nett4http/CamelTest.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.quarkus.it.camel.core; +package io.quarkus.it.camel.netty4http; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; @@ -30,16 +30,6 @@ import io.restassured.RestAssured; @QuarkusTest public class CamelTest { @Test - public void testRoutes() { - RestAssured.when().get("/test/routes").then().body(containsString("timer")); - } - - @Test - public void testProperties() { - RestAssured.when().get("/test/property/camel.context.name").then().body(is("quarkus-camel-example")); - } - - @Test public void testNetty4Http() throws Exception { RestAssured.when().get(new URI("http://localhost:8999/foo")).then().body(is("Netty Hello World")); } diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index e955bdb..311af54 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -35,6 +35,7 @@ <modules> <module>core</module> + <module>netty4-http</module> <module>aws-s3</module> <module>aws-sns</module> <module>aws-sqs</module>