Update to Reactor Aluminium SNAPSHOT

Currently the BOM versions are:

* reactor-core 3.0.6.BUILD-SNAPSHOT
* reactor-netty 0.6.2.BUILD-SNAPSHOT

This commit fixes as well a few deprecations in reactor-core.
This commit is contained in:
Brian Clozel
2017-03-10 15:20:40 +01:00
parent c8635de34e
commit b799013567
9 changed files with 48 additions and 42 deletions

View File

@@ -16,6 +16,7 @@
package org.springframework.web.reactive.resource;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -87,7 +88,7 @@ public class AppCacheManifestTransformerTests {
given(resource.getFilename()).willReturn("foobar.file");
given(this.chain.transform(exchange, resource)).willReturn(Mono.just(resource));
Resource result = this.transformer.transform(exchange, resource, this.chain).blockMillis(5000);
Resource result = this.transformer.transform(exchange, resource, this.chain).block(Duration.ofMillis(5000));
assertEquals(resource, result);
}
@@ -98,7 +99,7 @@ public class AppCacheManifestTransformerTests {
Resource resource = new ClassPathResource("test/error.appcache", getClass());
given(this.chain.transform(exchange, resource)).willReturn(Mono.just(resource));
Resource result = this.transformer.transform(exchange, resource, this.chain).blockMillis(5000);
Resource result = this.transformer.transform(exchange, resource, this.chain).block(Duration.ofMillis(5000));
assertEquals(resource, result);
}
@@ -119,7 +120,7 @@ public class AppCacheManifestTransformerTests {
this.chain = new DefaultResourceTransformerChain(resolverChain, transformers);
Resource resource = new ClassPathResource("test/test.appcache", getClass());
Resource result = this.transformer.transform(exchange, resource, this.chain).blockMillis(5000);
Resource result = this.transformer.transform(exchange, resource, this.chain).block(Duration.ofMillis(5000));
byte[] bytes = FileCopyUtils.copyToByteArray(result.getInputStream());
String content = new String(bytes, "UTF-8");

View File

@@ -195,17 +195,17 @@ public class ViewResolutionResultHandlerTests {
this.request = MockServerHttpRequest.get("/account").build();
ServerWebExchange exchange = createExchange();
handler.handleResult(exchange, result).blockMillis(5000);
handler.handleResult(exchange, result).block(Duration.ofMillis(5000));
assertResponseBody(exchange, "account: {id=123}");
this.request = MockServerHttpRequest.get("/account/").build();
exchange = createExchange();
handler.handleResult(exchange, result).blockMillis(5000);
handler.handleResult(exchange, result).block(Duration.ofMillis(5000));
assertResponseBody(exchange, "account: {id=123}");
this.request = MockServerHttpRequest.get("/account.123").build();
exchange = createExchange();
handler.handleResult(exchange, result).blockMillis(5000);
handler.handleResult(exchange, result).block(Duration.ofMillis(5000));
assertResponseBody(exchange, "account: {id=123}");
}
@@ -281,7 +281,7 @@ public class ViewResolutionResultHandlerTests {
this.request = MockServerHttpRequest.get("/account").build();
ServerWebExchange exchange = createExchange();
handler.handleResult(exchange, result).blockMillis(5000);
handler.handleResult(exchange, result).block(Duration.ofMillis(5000));
assertResponseBody(exchange, "account: {" +
"attr1=TestBean[name=Bean1], " +
"attr2=[TestBean[name=Bean1], TestBean[name=Bean2]], " +