Open gbourant opened 7 months ago
After further investigation, the problem is not just in the getConfigOverrides
but it expands to the getEnabledAlternatives
method (maybe other methods too ?).
It seems that when a class implements QuarkusTestProfile which overrides the default values (getEnabledAlternatives/getConfigOverrides/etc) they are not isolated to the current test but they are visible to other tests.
If i put each nested class to each own file then the tests are working fine, it has nothing to do with getConfigOverrides
or getEnabledAlternatives
rather than @Nested
.
Describe the bug
I'm writing nested tests for my Quarkus main method. In each nested test i override the config but the problem is that other tests see the changed config when it shouldn't.
In the following class the
MainTest#testMain
andInner2Test#testMain
work as expected but theInner#testMain
fails since theInner2Test
change the config.If you run each individual test from the IDE they do work, in order to reproduce it you have to run the whole test (MainTest.java) or simple run
mvn test
.I have created a reproducer here.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response