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

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

commit fc1759e81ec0a581125f62b4c5588570042a0b10
Author: Zineb Bendhiba <bendhiba.zi...@gmail.com>
AuthorDate: Mon May 10 10:53:17 2021 +0200

    quarkus.test.profile should be passed in the properties instead of 
TestResource fixes #2566
---
 integration-tests/main/pom.xml                     | 33 ++++++++++++++++-
 .../apache/camel/quarkus/main/CoreMainTest.java    |  4 +-
 .../camel/quarkus/main/CoreMainTestResource.java   | 36 ------------------
 .../main/src/test/resources/application.properties | 43 ++++++++++++++++++++++
 4 files changed, 77 insertions(+), 39 deletions(-)

diff --git a/integration-tests/main/pom.xml b/integration-tests/main/pom.xml
index 0a3bb89..04db750 100644
--- a/integration-tests/main/pom.xml
+++ b/integration-tests/main/pom.xml
@@ -197,9 +197,40 @@
 
     </dependencies>
 
-
     <profiles>
         <profile>
+            <id>full</id>
+            <activation>
+                <property>
+                    <name>!quickly</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <!-- test with test profile staging -->
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>default-test</id>
+                                <goals>
+                                    <goal>test</goal>
+                                </goals>
+                                <phase>integration-test</phase>
+                                <configuration>
+                                    <systemProperties>
+                                        
<quarkus.test.profile>staging</quarkus.test.profile>
+                                    </systemProperties>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
             <id>native</id>
             <activation>
                 <property>
diff --git 
a/integration-tests/main/src/test/java/org/apache/camel/quarkus/main/CoreMainTest.java
 
b/integration-tests/main/src/test/java/org/apache/camel/quarkus/main/CoreMainTest.java
index 5ab20b9..7482a93 100644
--- 
a/integration-tests/main/src/test/java/org/apache/camel/quarkus/main/CoreMainTest.java
+++ 
b/integration-tests/main/src/test/java/org/apache/camel/quarkus/main/CoreMainTest.java
@@ -21,7 +21,6 @@ import java.util.Map;
 
 import javax.ws.rs.core.MediaType;
 
-import io.quarkus.test.common.QuarkusTestResource;
 import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
 import io.restassured.http.ContentType;
@@ -34,6 +33,7 @@ import 
org.apache.camel.quarkus.it.support.mainlistener.CustomMainListener;
 import org.apache.camel.reactive.vertx.VertXReactiveExecutor;
 import org.apache.camel.reactive.vertx.VertXThreadPoolFactory;
 import org.apache.camel.support.DefaultLRUCacheFactory;
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 import static org.apache.camel.quarkus.test.Conditions.doesNotStartWith;
@@ -46,8 +46,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotEquals;
 
 @QuarkusTest
-@QuarkusTestResource(CoreMainTestResource.class)
 public class CoreMainTest {
+    @Disabled
     @Test
     public void testProperties() {
         
RestAssured.when().get("/test/property/camel.context.name").then().body(is("quarkus-camel-example"));
diff --git 
a/integration-tests/main/src/test/java/org/apache/camel/quarkus/main/CoreMainTestResource.java
 
b/integration-tests/main/src/test/java/org/apache/camel/quarkus/main/CoreMainTestResource.java
deleted file mode 100644
index da365f0..0000000
--- 
a/integration-tests/main/src/test/java/org/apache/camel/quarkus/main/CoreMainTestResource.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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 org.apache.camel.quarkus.main;
-
-import java.util.Map;
-
-import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
-
-import static org.apache.camel.util.CollectionHelper.mapOf;
-
-public class CoreMainTestResource implements 
QuarkusTestResourceLifecycleManager {
-    @Override
-    public Map<String, String> start() {
-        return mapOf(
-                "quarkus.test.profile", "staging",
-                "quarkus.test.native-image-profile", "staging");
-    }
-
-    @Override
-    public void stop() {
-    }
-}
diff --git a/integration-tests/main/src/test/resources/application.properties 
b/integration-tests/main/src/test/resources/application.properties
new file mode 100644
index 0000000..bdea9e4
--- /dev/null
+++ b/integration-tests/main/src/test/resources/application.properties
@@ -0,0 +1,43 @@
+## ---------------------------------------------------------------------------
+## 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 :: Camel
+#
+quarkus.camel.routes-discovery.exclude-patterns = org/**/*Filtered
+
+#
+# Camel
+#
+camel.context.name=quarkus-camel-example
+camel.rest.port = 9876
+camel.resilience4j.sliding-window-size = 1234
+
+#
+# Main
+#
+camel.main.auto-configuration-log-summary = false
+
+
+#
+# Other
+#
+the.message = default
+%staging.the.message = test
+
+#native build
+quarkus.native.additional-build-args= 
-Dquarkus.test.native-image-profile=staging

Reply via email to