X-Git-Url: http://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fde%2Fjuplo%2Fkafka%2Fchat%2Fbackend%2FAbstractHandoverIT.java;h=b55a4c047d5e22fd04338c2d63484d8bbc389446;hb=bce5ce999de007bb43c28f908fceef0646ac513c;hp=0047ff01454330400f4dfe881cf9e1f4b502a8b3;hpb=7131724ef1486c13fc32bf44fe0df31287600581;p=demos%2Fkafka%2Fchat diff --git a/src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverIT.java b/src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverIT.java index 0047ff01..b55a4c04 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverIT.java @@ -57,20 +57,21 @@ public abstract class AbstractHandoverIT } TestListener testListener = new TestListener(port, chatRooms); - CompletableFuture testListenerFuture = testListener + testListener .run() - .toFuture(); + .subscribe(message -> log.info( + "Received message: {}", + message)); - Thread.sleep(10000); + log.info("Sleeping for 3 seconds..."); + Thread.sleep(3000); for (int i = 0; i < NUM_CLIENTS; i++) { testWriters[i].running = false; testWriterFutures[i].join(); + log.info("Joined TestWriter {}", testWriters[i].user); } - - testListener.running = false; - testListenerFuture.join(); } Mono createChatRoom(String name)