When trying to use failsafe to run a @QuarkusIntegrationTest in JVM mode (outside the native profile), test executions fails.
Expected behavior
As documented here, QuarkusIntegrationTest can be run with failsafe.
Actual behavior
Test execution fails with the following error message, GreetingResourceTestIT being the test class annotated with @QuarkusIntegrationTest:
[INFO] Running org.acme.rest.GreetingResourceIT
2021-07-08 18:50:04,290 WARN [io.qua.hib.orm.run.pro.ProxyDefinitions] (main) Could not generate an enhanced proxy for entity 'org.acme.rest.FooEntity' (class='org.acme.rest.FooEntity') as it's final. Your application might perform better if we're allowed to extend it.
2021-07-08 18:50:04,942 INFO [io.quarkus] (main) Quarkus 2.0.1.Final on JVM started in 2.115s. Listening on: http://localhost:8081
2021-07-08 18:50:04,942 INFO [io.quarkus] (main) Profile test activated.
2021-07-08 18:50:04,942 INFO [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, hibernate-orm-panache-kotlin, jdbc-h2, kotlin, narayana-jta, resteasy, resteasy-jackson, smallrye-context-propagation]
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.254 s <<< FAILURE! - in org.acme.rest.GreetingResourceIT
[ERROR] org.acme.rest.GreetingResourceIT Time elapsed: 4.254 s <<< ERROR!
org.junit.jupiter.api.extension.TestInstantiationException: Failed to create test instance
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
Caused by: java.lang.reflect.InvocationTargetException
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: No bean found for required type [class org.acme.rest.GreetingResourceIT] and qualifiers [[]]
I also tried reproducing this from an even smaller project, but then this bug is not triggered. So there might be an interaction with other extensions configured in this project.
Configuration
included
Environment (please complete the following information):
Output of uname -a or ver
Linux pres 5.10.47-1-lts #1 SMP Wed, 30 Jun 2021 13:52:19 +0000 x86_64 GNU/Linux
Output of java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9)
OpenJDK 64-Bit Server VM (build 11.0.11+9, mixed mode)
GraalVM version (if different from Java)
not needed
Quarkus version or git rev
2.0.1.Final
Build tool (ie. output of mvnw --version or gradlew --version)
Describe the bug
When trying to use failsafe to run a
@QuarkusIntegrationTest
in JVM mode (outside thenative
profile), test executions fails.Expected behavior
As documented here, QuarkusIntegrationTest can be run with failsafe.
Actual behavior
Test execution fails with the following error message,
GreetingResourceTestIT
being the test class annotated with@QuarkusIntegrationTest
:To Reproduce
mvn verify
I also tried reproducing this from an even smaller project, but then this bug is not triggered. So there might be an interaction with other extensions configured in this project.
Configuration
included
Environment (please complete the following information):
Output of
uname -a
orver
Output of
java -version
GraalVM version (if different from Java)
not needed
Quarkus version or git rev
2.0.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Additional context
(Add any other context about the problem here.)
https://github.com/quarkusio/quarkus/issues/18537
$upstream:18537$