WIP:test: `*ConfigurationIT` asserts, if restored messages can be seen
authorKai Moritz <kai@juplo.de>
Thu, 14 Mar 2024 18:11:36 +0000 (19:11 +0100)
committerKai Moritz <kai@juplo.de>
Sat, 16 Mar 2024 09:34:24 +0000 (10:34 +0100)
src/test/java/de/juplo/kafka/chat/backend/AbstractConfigurationIT.java

index 9d87088..451690b 100644 (file)
@@ -23,10 +23,10 @@ import java.time.Duration;
 import java.util.List;
 import java.util.UUID;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.random.RandomGenerator;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.hamcrest.Matchers.endsWith;
-import static pl.rzrz.assertj.reactor.Assertions.assertThat;
 
 
 @Slf4j
@@ -257,9 +257,10 @@ public abstract class AbstractConfigurationIT
     MessageTo sentMessage = webTestClient
         .put()
         .uri(
-            "http://localhost:{port}/{chatRoomId}/nerd/7",
+            "http://localhost:{port}/{chatRoomId}/nerd/{messageId}",
             port,
-            EXISTING_CHATROOM)
+            EXISTING_CHATROOM,
+            RandomGenerator.getDefault().nextInt())
         .contentType(MediaType.TEXT_PLAIN)
         .accept(MediaType.APPLICATION_JSON)
         .bodyValue("Hello world!")