From 070916cbcde798d84c2a94b49dcdc7eb2eb11c21 Mon Sep 17 00:00:00 2001 From: Marcus Da Coregio Date: Fri, 10 Dec 2021 14:28:52 -0300 Subject: [PATCH] Increase timeout for WebTestClient Sometimes the tests fail with the message Timeout on blocking read for 5000000000 NANOSECONDS --- .../hello-security/src/test/java/example/HelloTests.java | 2 +- reactive/webflux-fn/hello/src/test/java/example/HelloTests.java | 2 +- .../src/test/java/example/HelloSecurityTests.java | 2 +- .../src/test/java/example/HelloSecurityTests.java | 2 +- .../webflux/java/hello/src/test/java/example/HelloTests.java | 2 +- .../src/test/java/example/HelloMethodApplicationTests.java | 2 +- .../src/integTest/java/example/OAuth2LoginApplicationTests.java | 2 +- .../example/ServerOAuth2ResourceServerApplicationITests.java | 2 +- .../src/test/java/example/OAuth2WebClientControllerTests.java | 2 +- .../java/example/OAuth2WebClientWebFluxApplicationTests.java | 2 +- .../RegisteredOAuth2AuthorizedClientControllerTests.java | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/reactive/webflux-fn/hello-security/src/test/java/example/HelloTests.java b/reactive/webflux-fn/hello-security/src/test/java/example/HelloTests.java index 0984d43..c338dfd 100644 --- a/reactive/webflux-fn/hello-security/src/test/java/example/HelloTests.java +++ b/reactive/webflux-fn/hello-security/src/test/java/example/HelloTests.java @@ -28,7 +28,7 @@ import org.springframework.test.web.reactive.server.WebTestClient; * @since 5.0 */ @SpringBootTest -@AutoConfigureWebTestClient +@AutoConfigureWebTestClient(timeout = "36000") public class HelloTests { @Autowired diff --git a/reactive/webflux-fn/hello/src/test/java/example/HelloTests.java b/reactive/webflux-fn/hello/src/test/java/example/HelloTests.java index 023c9c2..62effa3 100644 --- a/reactive/webflux-fn/hello/src/test/java/example/HelloTests.java +++ b/reactive/webflux-fn/hello/src/test/java/example/HelloTests.java @@ -27,7 +27,7 @@ import org.springframework.test.web.reactive.server.WebTestClient; * @since 5.0 */ @SpringBootTest -@AutoConfigureWebTestClient +@AutoConfigureWebTestClient(timeout = "36000") public class HelloTests { @Autowired diff --git a/reactive/webflux/java/hello-security-explicit/src/test/java/example/HelloSecurityTests.java b/reactive/webflux/java/hello-security-explicit/src/test/java/example/HelloSecurityTests.java index 6e7985e..4038b8b 100644 --- a/reactive/webflux/java/hello-security-explicit/src/test/java/example/HelloSecurityTests.java +++ b/reactive/webflux/java/hello-security-explicit/src/test/java/example/HelloSecurityTests.java @@ -28,7 +28,7 @@ import org.springframework.test.web.reactive.server.WebTestClient; * @since 5.0 */ @SpringBootTest -@AutoConfigureWebTestClient +@AutoConfigureWebTestClient(timeout = "36000") public class HelloSecurityTests { @Autowired diff --git a/reactive/webflux/java/hello-security/src/test/java/example/HelloSecurityTests.java b/reactive/webflux/java/hello-security/src/test/java/example/HelloSecurityTests.java index 5eedc6f..8bcb762 100644 --- a/reactive/webflux/java/hello-security/src/test/java/example/HelloSecurityTests.java +++ b/reactive/webflux/java/hello-security/src/test/java/example/HelloSecurityTests.java @@ -28,7 +28,7 @@ import org.springframework.test.web.reactive.server.WebTestClient; * @since 5.0 */ @SpringBootTest -@AutoConfigureWebTestClient +@AutoConfigureWebTestClient(timeout = "36000") public class HelloSecurityTests { @Autowired diff --git a/reactive/webflux/java/hello/src/test/java/example/HelloTests.java b/reactive/webflux/java/hello/src/test/java/example/HelloTests.java index 05a0f9f..54a365b 100644 --- a/reactive/webflux/java/hello/src/test/java/example/HelloTests.java +++ b/reactive/webflux/java/hello/src/test/java/example/HelloTests.java @@ -27,7 +27,7 @@ import org.springframework.test.web.reactive.server.WebTestClient; * @since 5.0 */ @SpringBootTest -@AutoConfigureWebTestClient +@AutoConfigureWebTestClient(timeout = "36000") public class HelloTests { @Autowired diff --git a/reactive/webflux/java/method/src/test/java/example/HelloMethodApplicationTests.java b/reactive/webflux/java/method/src/test/java/example/HelloMethodApplicationTests.java index 6782827..1b8f701 100644 --- a/reactive/webflux/java/method/src/test/java/example/HelloMethodApplicationTests.java +++ b/reactive/webflux/java/method/src/test/java/example/HelloMethodApplicationTests.java @@ -28,7 +28,7 @@ import org.springframework.test.web.reactive.server.WebTestClient; * @since 5.0 */ @SpringBootTest -@AutoConfigureWebTestClient +@AutoConfigureWebTestClient(timeout = "36000") public class HelloMethodApplicationTests { @Autowired diff --git a/reactive/webflux/java/oauth2/login/src/integTest/java/example/OAuth2LoginApplicationTests.java b/reactive/webflux/java/oauth2/login/src/integTest/java/example/OAuth2LoginApplicationTests.java index bfe9169..a8d1233 100644 --- a/reactive/webflux/java/oauth2/login/src/integTest/java/example/OAuth2LoginApplicationTests.java +++ b/reactive/webflux/java/oauth2/login/src/integTest/java/example/OAuth2LoginApplicationTests.java @@ -36,7 +36,7 @@ import static org.springframework.security.test.web.reactive.server.SecurityMock * @author Rob Winch */ @SpringBootTest -@AutoConfigureWebTestClient +@AutoConfigureWebTestClient(timeout = "36000") public class OAuth2LoginApplicationTests { @Autowired diff --git a/reactive/webflux/java/oauth2/resource-server/src/integTest/java/example/ServerOAuth2ResourceServerApplicationITests.java b/reactive/webflux/java/oauth2/resource-server/src/integTest/java/example/ServerOAuth2ResourceServerApplicationITests.java index 26984a1..9b5146a 100644 --- a/reactive/webflux/java/oauth2/resource-server/src/integTest/java/example/ServerOAuth2ResourceServerApplicationITests.java +++ b/reactive/webflux/java/oauth2/resource-server/src/integTest/java/example/ServerOAuth2ResourceServerApplicationITests.java @@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.containsString; * @since 5.1 */ @SpringBootTest -@AutoConfigureWebTestClient +@AutoConfigureWebTestClient(timeout = "36000") @ActiveProfiles("test") public class ServerOAuth2ResourceServerApplicationITests { diff --git a/reactive/webflux/java/oauth2/webclient/src/test/java/example/OAuth2WebClientControllerTests.java b/reactive/webflux/java/oauth2/webclient/src/test/java/example/OAuth2WebClientControllerTests.java index a0fb55e..eca57b5 100644 --- a/reactive/webflux/java/oauth2/webclient/src/test/java/example/OAuth2WebClientControllerTests.java +++ b/reactive/webflux/java/oauth2/webclient/src/test/java/example/OAuth2WebClientControllerTests.java @@ -39,7 +39,7 @@ import static org.springframework.security.test.web.reactive.server.SecurityMock @WebFluxTest @Import({ SecurityConfiguration.class, OAuth2WebClientController.class }) -@AutoConfigureWebTestClient +@AutoConfigureWebTestClient(timeout = "36000") public class OAuth2WebClientControllerTests { private static MockWebServer web = new MockWebServer(); diff --git a/reactive/webflux/java/oauth2/webclient/src/test/java/example/OAuth2WebClientWebFluxApplicationTests.java b/reactive/webflux/java/oauth2/webclient/src/test/java/example/OAuth2WebClientWebFluxApplicationTests.java index 59a1258..29b244e 100644 --- a/reactive/webflux/java/oauth2/webclient/src/test/java/example/OAuth2WebClientWebFluxApplicationTests.java +++ b/reactive/webflux/java/oauth2/webclient/src/test/java/example/OAuth2WebClientWebFluxApplicationTests.java @@ -27,7 +27,7 @@ import org.springframework.test.web.reactive.server.WebTestClient; * @author Rob Winch */ @SpringBootTest -@AutoConfigureWebTestClient +@AutoConfigureWebTestClient(timeout = "36000") public class OAuth2WebClientWebFluxApplicationTests { @Autowired diff --git a/reactive/webflux/java/oauth2/webclient/src/test/java/example/RegisteredOAuth2AuthorizedClientControllerTests.java b/reactive/webflux/java/oauth2/webclient/src/test/java/example/RegisteredOAuth2AuthorizedClientControllerTests.java index 4bca019..d59a67a 100644 --- a/reactive/webflux/java/oauth2/webclient/src/test/java/example/RegisteredOAuth2AuthorizedClientControllerTests.java +++ b/reactive/webflux/java/oauth2/webclient/src/test/java/example/RegisteredOAuth2AuthorizedClientControllerTests.java @@ -39,7 +39,7 @@ import static org.springframework.security.test.web.reactive.server.SecurityMock @WebFluxTest @Import({ SecurityConfiguration.class, RegisteredOAuth2AuthorizedClientController.class }) -@AutoConfigureWebTestClient +@AutoConfigureWebTestClient(timeout = "36000") public class RegisteredOAuth2AuthorizedClientControllerTests { private static MockWebServer web = new MockWebServer();