TestProfile's getEnabledAlternatives CDI BEAN leaks to unrelated TestProfile's test #44117
Labels
area/arc
Issue related to ARC (dependency injection)
area/testing
kind/enhancement
New feature or request
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
The text was updated successfully, but these errors were encountered: