Browse Source

sync reactor

pull/1111/head
Stephane Maldini 9 years ago
parent
commit
14948d4241
  1. 2
      spring-web-reactive/src/test/java/org/springframework/http/server/reactive/AsyncIntegrationTests.java
  2. 4
      spring-web-reactive/src/test/java/org/springframework/web/reactive/view/ViewResolverResultHandlerTests.java

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

@ -65,7 +65,7 @@ public class AsyncIntegrationTests extends AbstractHttpHandlerIntegrationTests { @@ -65,7 +65,7 @@ public class AsyncIntegrationTests extends AbstractHttpHandlerIntegrationTests {
public Mono<Void> 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())));

4
spring-web-reactive/src/test/java/org/springframework/web/reactive/view/ViewResolverResultHandlerTests.java

@ -19,6 +19,7 @@ import java.lang.reflect.Method; @@ -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; @@ -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 { @@ -194,7 +194,7 @@ public class ViewResolverResultHandlerTests {
HandlerResult result = new HandlerResult(new Object(), value, type, this.model);
Mono<Void> mono = handler.handleResult(this.exchange, result);
TestSubscriber<Void> 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) {

Loading…
Cancel
Save