-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TestProfile's getEnabledAlternatives CDI BEAN leaks to unrelated TestProfile's test #44117
Comments
Mixing 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 |
Clean up effects of test profiles when @QuarkusMainTest completes
Fixes: quarkusio#44117 (cherry picked from commit 71804eb)
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: