Open yuan-kuan opened 3 weeks ago
/cc @Ladicek (arc), @manovotn (arc), @mkouba (arc)
Mixing @QuarkusTest
and @QuarkusMainTest
isn't documented in https://quarkus.io/guides/getting-started-testing#mixing-quarkustest-with-other-type-of-tests, but it feels like it isn't allowed either. If I move the @QuarkusTest
execution into a separate execution of the Maven Surefire plugin (as documented), both tests pass.
Not sure who knows whether this is allowed. CC @geoand maybe?
Hm, My guess is that mixing those two works as long as you don't have profiles. I think this is fixable
Describe the bug
Running a normal
@QuarkusTest
with TestProfile without any specialgetEnabledAlternatives()
definition will mistakenly use another TestProfile's mock CDI BEAN declared ingetEnabledAlternatives()
.My Profiles:
TestProfile without mock service
TestProfile with mock service
Expected behavior
CDI BEAN used in tests under a different TestProfile should be isolated from each other.
Actual behavior
NormalTest failed because it uses the Mock Service defined in another TestProfile.
How to Reproduce?
quarkus dev
o
and pressr
to run the unit tests with output on.okTest
's failureOutput of
uname -a
orver
Darwin 24.0.0 Darwin Kernel Version 24.0.0: Wed Aug 7 03:09:57 PDT 2024; root:xnu-11215.1.9~22/RELEASE_ARM64_T8112 arm64
Output of
java -version
openjdk version "21.0.5" 2024-10-15 LTS
Quarkus version or git rev
quarkus 3.15.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Additional information
No response