You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have multiple @SpringBootTests that start a web environment, the property springdoc.model-converters.polymorphic-converter.enabled is evaluated when starting the first test and the result / the io.swagger.v3.core.converter.ModelConverters to be used are apparently cached somewhere outside the Spring application context.
If you then try to set the property to a different value in subsequent unit tests (e.g. via org.springframework.boot.test.context.SpringBootTest.properties()), this has no effect.
(@DirtiesContext and other approaches also do not work as a workaround).
To Reproduce
Steps to reproduce the behavior:
JUnit 5.11.3
Spring Boot 3.3.9
springdoc 2.6.0
Swagger 2.2.27
Apache Maven 3.9.9
Java 21.0.3
Expected behavior
The property springdoc.model-converters.polymorphic-converter.enabled may be overwritten in any test.
The text was updated successfully, but these errors were encountered:
Describe the bug
If you have multiple @SpringBootTests that start a web environment, the property springdoc.model-converters.polymorphic-converter.enabled is evaluated when starting the first test and the result / the io.swagger.v3.core.converter.ModelConverters to be used are apparently cached somewhere outside the Spring application context.
If you then try to set the property to a different value in subsequent unit tests (e.g. via org.springframework.boot.test.context.SpringBootTest.properties()), this has no effect.
(@DirtiesContext and other approaches also do not work as a workaround).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The property springdoc.model-converters.polymorphic-converter.enabled may be overwritten in any test.
The text was updated successfully, but these errors were encountered: