From 14948d4241f60f0ba43b43ecfd6aa49af2f41665 Mon Sep 17 00:00:00 2001 From: Stephane Maldini Date: Tue, 1 Mar 2016 20:50:55 +0000 Subject: [PATCH] sync reactor --- .../http/server/reactive/AsyncIntegrationTests.java | 2 +- .../web/reactive/view/ViewResolverResultHandlerTests.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-web-reactive/src/test/java/org/springframework/http/server/reactive/AsyncIntegrationTests.java b/spring-web-reactive/src/test/java/org/springframework/http/server/reactive/AsyncIntegrationTests.java index 5c121a2ecf..a0efb8968b 100644 --- a/spring-web-reactive/src/test/java/org/springframework/http/server/reactive/AsyncIntegrationTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/http/server/reactive/AsyncIntegrationTests.java @@ -65,7 +65,7 @@ public class AsyncIntegrationTests extends AbstractHttpHandlerIntegrationTests { public Mono handle(ServerHttpRequest request, ServerHttpResponse response) { return response.setBody(Fluxion.just("h", "e", "l", "l", "o") .useTimer(Timer.global()) - .throttleRequest(100) + .delay(1) .dispatchOn(asyncGroup) .collect(allocator::allocateBuffer, (buffer, str) -> buffer.write(str.getBytes()))); diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/view/ViewResolverResultHandlerTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/view/ViewResolverResultHandlerTests.java index 0780ce5f35..6dd15aa541 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/view/ViewResolverResultHandlerTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/view/ViewResolverResultHandlerTests.java @@ -19,6 +19,7 @@ import java.lang.reflect.Method; import java.net.URI; import java.nio.ByteBuffer; import java.nio.charset.Charset; +import java.time.Duration; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; @@ -26,7 +27,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Optional; -import java.util.concurrent.TimeUnit; import org.junit.Before; import org.junit.Test; @@ -194,7 +194,7 @@ public class ViewResolverResultHandlerTests { HandlerResult result = new HandlerResult(new Object(), value, type, this.model); Mono mono = handler.handleResult(this.exchange, result); TestSubscriber subscriber = new TestSubscriber<>(); - return subscriber.bindTo(mono).await(1, TimeUnit.SECONDS); + return subscriber.bindTo(mono).await(Duration.ofSeconds(1)); } private static DataBuffer asDataBuffer(String value) {