Update tests due to deprecations in Reactor
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user