From: Kai Moritz Date: Thu, 14 Mar 2024 18:11:36 +0000 (+0100) Subject: WIP:test: `*ConfigurationIT` asserts, if restored messages can be seen X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=89640412d85dd52f5060794f97f703c2163c36f0;p=demos%2Fkafka%2Fchat WIP:test: `*ConfigurationIT` asserts, if restored messages can be seen --- diff --git a/src/test/java/de/juplo/kafka/chat/backend/AbstractConfigurationIT.java b/src/test/java/de/juplo/kafka/chat/backend/AbstractConfigurationIT.java index 9d870889..451690b2 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/AbstractConfigurationIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/AbstractConfigurationIT.java @@ -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!")