From 09995381a4d5667cebd9d5dfdb915dcd48f169b5 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 1 Mar 2024 19:56:54 +0100 Subject: [PATCH] WIP:test: HandoverIT-POC - Refactored listening into class `TestListener` --- .../java/de/juplo/kafka/chat/backend/TestListener.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/java/de/juplo/kafka/chat/backend/TestListener.java b/src/test/java/de/juplo/kafka/chat/backend/TestListener.java index 0ea86287..1c993c17 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/TestListener.java +++ b/src/test/java/de/juplo/kafka/chat/backend/TestListener.java @@ -44,9 +44,14 @@ public class TestListener implements Runnable return Mono.error(e); } }) + .doOnNext(message -> log.info( + "Received a message from chat-room {}: {}", + chatRoom, + message)) .take(30)) .takeUntil(message -> !running) - .subscribe(message -> log.info("Received message: {}", message)); + .then() + .block(); } Flux> receiveMessages(ChatRoomInfoTo chatRoom) -- 2.20.1