From a011b841a2a8c9ed019b233daf0a3cd2db8af81e Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 24 Feb 2024 18:59:05 +0100 Subject: [PATCH] WIP:wait --- .../de/juplo/kafka/chat/backend/KafkaHandoverIT.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test/java/de/juplo/kafka/chat/backend/KafkaHandoverIT.java b/src/test/java/de/juplo/kafka/chat/backend/KafkaHandoverIT.java index df530b5a..c8f6b299 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/KafkaHandoverIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/KafkaHandoverIT.java @@ -116,15 +116,16 @@ class KafkaHandoverIT extends AbstractHandoverIT { if (response.statusCode().equals(HttpStatus.OK)) { - return response.bodyToMono(StatusTo.class); + return response + .bodyToMono(StatusTo.class) + .map(StatusTo::getStatus) + .map(status -> status.equalsIgnoreCase("UP")); } else { - return response.createError(); + return Mono.just(false); } }) - .map(StatusTo::getStatus) - .map(status -> status.equalsIgnoreCase("UP")) .block()); log.info("Some backend was UP"); -- 2.20.1