WIP:wait
authorKai Moritz <kai@juplo.de>
Sat, 24 Feb 2024 17:59:05 +0000 (18:59 +0100)
committerKai Moritz <kai@juplo.de>
Sat, 24 Feb 2024 17:59:05 +0000 (18:59 +0100)
src/test/java/de/juplo/kafka/chat/backend/KafkaHandoverIT.java

index df530b5..c8f6b29 100644 (file)
@@ -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");