Skip to content

Commit 6e54ed0

Browse files
committed
Add missing timeout in web-reactive IntegrationTests
1 parent 10c90a6 commit 6e54ed0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

spring-web/src/test/java/org/springframework/http/server/reactive/FlushingIntegrationTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232

3333
import static org.junit.Assume.assumeFalse;
3434

35+
import java.time.Duration;
36+
3537
/**
3638
* @author Sebastien Deleuze
3739
*/
@@ -57,7 +59,7 @@ public void testFlushing() throws Exception {
5759

5860
TestSubscriber
5961
.subscribe(result)
60-
.await()
62+
.await(Duration.ofSeconds(5))
6163
.assertValues("data0data1");
6264
}
6365

spring-web/src/test/java/org/springframework/web/client/reactive/WebClientIntegrationTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static org.springframework.web.client.reactive.ClientWebRequestBuilders.*;
2121
import static org.springframework.web.client.reactive.ResponseExtractors.*;
2222

23+
import java.time.Duration;
2324
import java.util.function.Consumer;
2425

2526
import okhttp3.HttpUrl;
@@ -291,7 +292,7 @@ public void shouldGetErrorWhen404() throws Exception {
291292

292293
TestSubscriber
293294
.subscribe(result)
294-
.await()
295+
.await(Duration.ofSeconds(3))
295296
.assertErrorWith(t -> {
296297
assertThat(t, Matchers.instanceOf(WebClientErrorException.class));
297298
WebClientErrorException exc = (WebClientErrorException) t;
@@ -324,7 +325,7 @@ public void shouldGetErrorWhen500() throws Exception {
324325

325326
TestSubscriber
326327
.subscribe(result)
327-
.await()
328+
.await(Duration.ofSeconds(3))
328329
.assertErrorWith(t -> {
329330
assertThat(t, Matchers.instanceOf(WebServerErrorException.class));
330331
WebServerErrorException exc = (WebServerErrorException) t;

0 commit comments

Comments
 (0)