diff --git a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/CoroutinesIntegrationTests.kt b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/CoroutinesIntegrationTests.kt index 1e5b4f3243..3af6b1b886 100644 --- a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/CoroutinesIntegrationTests.kt +++ b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/CoroutinesIntegrationTests.kt @@ -40,7 +40,6 @@ import org.springframework.web.reactive.config.EnableWebFlux import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer import org.springframework.web.testfixture.http.server.reactive.bootstrap.UndertowHttpServer import reactor.core.publisher.Flux -import java.time.Duration class CoroutinesIntegrationTests : AbstractRequestMappingIntegrationTests() { @@ -123,7 +122,7 @@ class CoroutinesIntegrationTests : AbstractRequestMappingIntegrationTests() { val entity = performGet("/entity-flux", HttpHeaders.EMPTY, String::class.java) assertThat(entity.statusCode).isEqualTo(HttpStatus.OK) - assertThat(entity.body).isEqualTo("01234") + assertThat(entity.body).isEqualTo("foobar") } @ParameterizedHttpServerTest @@ -196,9 +195,8 @@ class CoroutinesIntegrationTests : AbstractRequestMappingIntegrationTests() { @GetMapping("/entity-flux") suspend fun entityFlux() : ResponseEntity> { - val strings = Flux.interval(Duration.ofMillis(100)).take(5) - .map { l -> l.toString() } - delay(10) + val strings = Flux.just("foo", "bar"); + delay(1) return ResponseEntity.ok().body(strings) }