11/*
2- * Copyright 2002-2019 the original author or authors.
2+ * Copyright 2002-2021 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2020import java .nio .file .Files ;
2121import java .nio .file .Path ;
2222import java .nio .file .Paths ;
23+ import java .time .Duration ;
2324import java .util .Map ;
2425
2526import reactor .core .publisher .Mono ;
@@ -72,7 +73,8 @@ void multipartData(HttpServer httpServer) throws Exception {
7273 StepVerifier
7374 .create (result )
7475 .consumeNextWith (entity -> assertThat (entity .getStatusCode ()).isEqualTo (HttpStatus .OK ))
75- .verifyComplete ();
76+ .expectComplete ()
77+ .verify (Duration .ofSeconds (5 ));
7678 }
7779
7880 @ ParameterizedHttpServerTest
@@ -89,7 +91,8 @@ void parts(HttpServer httpServer) throws Exception {
8991 StepVerifier
9092 .create (result )
9193 .consumeNextWith (entity -> assertThat (entity .getStatusCode ()).isEqualTo (HttpStatus .OK ))
92- .verifyComplete ();
94+ .expectComplete ()
95+ .verify (Duration .ofSeconds (5 ));
9396 }
9497
9598 @ ParameterizedHttpServerTest
@@ -119,7 +122,8 @@ void transferTo(HttpServer httpServer) throws Exception {
119122 fail ("IOException" , ex );
120123 }
121124 })
122- .verifyComplete ();
125+ .expectComplete ()
126+ .verify (Duration .ofSeconds (5 ));
123127 }
124128
125129 private MultiValueMap <String , HttpEntity <?>> generateBody () {
@@ -193,8 +197,7 @@ private Mono<Path> createTempFile() {
193197 catch (IOException ex ) {
194198 return Mono .error (ex );
195199 }
196- })
197- .subscribeOn (Schedulers .boundedElastic ());
200+ }).subscribeOn (Schedulers .boundedElastic ());
198201 }
199202
200203 }
0 commit comments