From fc0841c60f43a7977fdc69481c7e9f29ff9e71f8 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 5 Sep 2017 13:57:20 -0400 Subject: [PATCH] Adapt to method name change in Mono --- .../http/server/reactive/RandomHandlerIntegrationTests.java | 2 +- .../web/reactive/socket/WebSocketIntegrationTests.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/RandomHandlerIntegrationTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/RandomHandlerIntegrationTests.java index f50447dfa0..5978951784 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/RandomHandlerIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/RandomHandlerIntegrationTests.java @@ -84,7 +84,7 @@ public class RandomHandlerIntegrationTests extends AbstractHttpHandlerIntegratio Mono requestSizeMono = request.getBody(). reduce(0, (integer, dataBuffer) -> integer + dataBuffer.readableByteCount()). - doAfterTerminate((size, throwable) -> { + doOnSuccessOrError((size, throwable) -> { assertNull(throwable); assertEquals(REQUEST_SIZE, (long) size); }); diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java index e5805ba80f..899d29dff5 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java @@ -73,7 +73,7 @@ public class WebSocketIntegrationTests extends AbstractWebSocketIntegrationTests .subscribeWith(output) .doOnNext(s -> logger.debug("inbound " + s)) .then() - .doOnTerminate((aVoid, ex) -> + .doOnSuccessOrError((aVoid, ex) -> logger.debug("Done with " + (ex != null ? ex.getMessage() : "success"))); }) .block(Duration.ofMillis(5000));