From ce9db58d4eb9b6e1623141f91753dd462d8e146f Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 27 Feb 2024 23:53:08 +0100 Subject: [PATCH] test: HandoverIT-POC - added a delay to the sending-loop --- .../java/de/juplo/kafka/chat/backend/TestClient.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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); + } } } -- 2.20.1