test: HandoverIT-POC - added a delay to the sending-loop
authorKai Moritz <kai@juplo.de>
Tue, 27 Feb 2024 22:53:08 +0000 (23:53 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 27 Feb 2024 22:53:08 +0000 (23:53 +0100)
src/test/java/de/juplo/kafka/chat/backend/TestClient.java

index fe39e44..0461970 100644 (file)
@@ -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);
+      }
     }
   }