Skip to content

Commit

Permalink
quarkus.test.profile should be passed in the properties instead of Te…
Browse files Browse the repository at this point in the history
…stResource fixes apache#2566
  • Loading branch information
zbendhiba authored and ppalaga committed May 21, 2021
1 parent b6b64c2 commit 43aa4bd
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 39 deletions.
33 changes: 32 additions & 1 deletion integration-tests/main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,39 @@

</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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

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;
Expand All @@ -34,6 +33,7 @@
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;
Expand All @@ -46,8 +46,8 @@
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"));
Expand Down

This file was deleted.

43 changes: 43 additions & 0 deletions integration-tests/main/src/test/resources/application.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 43aa4bd

Please sign in to comment.