File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
spring-web/src/test/java/org/springframework Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 32
32
33
33
import static org .junit .Assume .assumeFalse ;
34
34
35
+ import java .time .Duration ;
36
+
35
37
/**
36
38
* @author Sebastien Deleuze
37
39
*/
@@ -57,7 +59,7 @@ public void testFlushing() throws Exception {
57
59
58
60
TestSubscriber
59
61
.subscribe (result )
60
- .await ()
62
+ .await (Duration . ofSeconds ( 5 ) )
61
63
.assertValues ("data0data1" );
62
64
}
63
65
Original file line number Diff line number Diff line change 20
20
import static org .springframework .web .client .reactive .ClientWebRequestBuilders .*;
21
21
import static org .springframework .web .client .reactive .ResponseExtractors .*;
22
22
23
+ import java .time .Duration ;
23
24
import java .util .function .Consumer ;
24
25
25
26
import okhttp3 .HttpUrl ;
@@ -291,7 +292,7 @@ public void shouldGetErrorWhen404() throws Exception {
291
292
292
293
TestSubscriber
293
294
.subscribe (result )
294
- .await ()
295
+ .await (Duration . ofSeconds ( 3 ) )
295
296
.assertErrorWith (t -> {
296
297
assertThat (t , Matchers .instanceOf (WebClientErrorException .class ));
297
298
WebClientErrorException exc = (WebClientErrorException ) t ;
@@ -324,7 +325,7 @@ public void shouldGetErrorWhen500() throws Exception {
324
325
325
326
TestSubscriber
326
327
.subscribe (result )
327
- .await ()
328
+ .await (Duration . ofSeconds ( 3 ) )
328
329
.assertErrorWith (t -> {
329
330
assertThat (t , Matchers .instanceOf (WebServerErrorException .class ));
330
331
WebServerErrorException exc = (WebServerErrorException ) t ;
You can’t perform that action at this time.
0 commit comments