Update tests due to deprecations in Reactor

This commit is contained in:
Sam Brannen
2020-08-08 12:35:34 +02:00
parent 01b79514da
commit d0cf90bb8e
3 changed files with 16 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.filter.reactive;
import java.time.Duration;
@@ -33,10 +34,10 @@ import static org.assertj.core.api.Assertions.assertThat;
* Unit tests for {@link ServerWebExchangeContextFilter}.
* @author Rossen Stoyanchev
*/
public class ServerWebExchangeContextFilterTests {
class ServerWebExchangeContextFilterTests {
@Test
public void extractServerWebExchangeFromContext() {
void extractServerWebExchangeFromContext() {
MyService service = new MyService();
HttpHandler httpHandler = WebHttpHandlerBuilder
@@ -61,7 +62,7 @@ public class ServerWebExchangeContextFilterTests {
}
public Mono<String> service() {
return Mono.just("result").subscriberContext(context -> {
return Mono.just("result").contextWrite(context -> {
ServerWebExchangeContextFilter.get(context).ifPresent(exchangeRef::set);
return context;
});