From: Kai Moritz Date: Tue, 27 Feb 2024 22:53:08 +0000 (+0100) Subject: test: HandoverIT-POC - added a delay to the sending-loop X-Git-Tag: rebase--2024-03-03--11-38~25 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=ce9db58d4eb9b6e1623141f91753dd462d8e146f;p=demos%2Fkafka%2Fchat test: HandoverIT-POC - added a delay to the sending-loop --- diff --git a/src/test/java/de/juplo/kafka/chat/backend/TestClient.java b/src/test/java/de/juplo/kafka/chat/backend/TestClient.java index fe39e441..0461970f 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/TestClient.java +++ b/src/test/java/de/juplo/kafka/chat/backend/TestClient.java @@ -10,6 +10,7 @@ import reactor.core.publisher.Mono; import reactor.util.retry.Retry; import java.time.Duration; +import java.util.concurrent.ThreadLocalRandom; @Slf4j @@ -31,6 +32,14 @@ public class TestClient message, chatRoom)); } + try + { + Thread.sleep(ThreadLocalRandom.current().nextLong(700, 1000)); + } + catch (Exception e) + { + throw new RuntimeException(e); + } } }