Skip to content

Commit 4391957

Browse files
author
Björn
committed
Fix test failing due dirty Spring context
I don't fully understand the fix but forcing SpringBootTest runner to not reuse the context solves the issue with SpringDocApp1451Test.java always failing with the following. "WebClientRequestException: Connection refused: localhost/127.0.0.1:9086" BUGFIX
1 parent 0a4e47e commit 4391957

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app145/SpringDocApp1451Test.java

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package test.org.springdoc.api.app145;
2020

2121
import org.junit.jupiter.api.Test;
22+
import org.springframework.test.annotation.DirtiesContext;
2223
import test.org.springdoc.api.AbstractSpringDocActuatorTest;
2324

2425
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -32,6 +33,7 @@
3233
import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
3334

3435

36+
@DirtiesContext
3537
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT,
3638
properties = { "management.endpoints.web.exposure.include=*",
3739
"server.port=55594",

0 commit comments

Comments
 (0)