From: Kai Moritz Date: Sat, 24 Feb 2024 17:59:05 +0000 (+0100) Subject: WIP:wait X-Git-Tag: rebase--2024-02-26--19-46~13 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=a011b841a2a8c9ed019b233daf0a3cd2db8af81e;p=demos%2Fkafka%2Fchat WIP:wait --- 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");