I'm currently trying to test a Quarkus application by running some integration tests.
However, I have scenarios where I need sometimes to dynamically change some of the runtime properties accordingly before the Quarkus app is launched.
To achieve this, I have my integration test classes annotated with @QuarkusIntegrationTest and using QuarkusTestResourceLifecycleManager resources to change some runtime properties and return them as a map. However, the test resource class implementing QuarkusTestResourceLifecycleManager is not being called anytime when the integration test is executed. It seems these test resources are being ignored - They work fine when they are used with classes annotated with @QuarkusTest but not with @QuarkusIntegrationTest.
Expected behavior
So with above scenario, when I execute the integration test I would expect them to behave following the below steps in this order:
Call the test resources classes implementing QuarkusTestResourceLifecycleManager interface.
Start up quarkus app passing the runtime properties defined in the start/init method of the classes implementing the QuarkusTestResourceLifecycleManager interface.
Execute the integration test.
Actual behavior
So with above scenario, I am getting the following behaviour when I execute the integration test:
Start up quarkus app without passing the runtime properties modified by the test resource class implementing QuarkusTestResourceLifecycleManager. This classes are never called.
Integration test is executed
How to Reproduce?
Download attached zip
Extract zip
run mvn clean install
Unit test will success and Integration test will fail
Describe the bug
I'm currently trying to test a Quarkus application by running some integration tests. However, I have scenarios where I need sometimes to dynamically change some of the runtime properties accordingly before the Quarkus app is launched.
To achieve this, I have my integration test classes annotated with @QuarkusIntegrationTest and using QuarkusTestResourceLifecycleManager resources to change some runtime properties and return them as a map. However, the test resource class implementing QuarkusTestResourceLifecycleManager is not being called anytime when the integration test is executed. It seems these test resources are being ignored - They work fine when they are used with classes annotated with @QuarkusTest but not with @QuarkusIntegrationTest.
Expected behavior
So with above scenario, when I execute the integration test I would expect them to behave following the below steps in this order:
Actual behavior
So with above scenario, I am getting the following behaviour when I execute the integration test:
How to Reproduce?
Download attached zip
reproducer.zip
Output of
uname -a
orver
Linux antferna.remote.csb 4.18.0-305.12.1.el8_4.x86_64 #1 SMP Mon Jul 26 08:06:24 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "11.0.12" 2021-07-20 LTS
GraalVM version (if different from Java)
none
Quarkus version or git rev
2.2.0.CR1
Build tool (ie. output of
mvnw --version
orgradlew --version
)maven 3.6.3
Additional information
No response
https://github.com/quarkusio/quarkus/issues/20205
$upstream:20205$