From: Kai Moritz Date: Fri, 1 Sep 2023 16:27:07 +0000 (+0200) Subject: WIP X-Git-Tag: rebase--2023-09-02--10-22~3 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=37d08aac0c5dca8728226072a76829da61302662;p=demos%2Fkafka%2Fchat WIP --- diff --git a/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatRoomChannel.java b/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatRoomChannel.java index 92f294b2..ad9531cb 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatRoomChannel.java +++ b/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatRoomChannel.java @@ -375,7 +375,7 @@ public class ChatRoomChannel implements Runnable, ConsumerRebalanceListener if (!isShardOwned[shard]) { - log.error("Shard {} for chat-room {] not owned!", shard, id); + log.error("Shard {} for chat-room {} not owned!", shard, id); return Mono.error(new ShardNotOwnedException(shard)); } diff --git a/src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeTestBase.java b/src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeTestBase.java index bbe62a17..4bf11899 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeTestBase.java +++ b/src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeTestBase.java @@ -31,11 +31,10 @@ public class ChatHomeTestBase // When Mono mono = chatHome .getChatRoom(chatRoomId) - .log() + .log("testGetExistingChatroom") .retryWhen(Retry .backoff(5, Duration.ofSeconds(1)) - .filter(throwable -> throwable instanceof LoadInProgressException)) - .log(); + .filter(throwable -> throwable instanceof LoadInProgressException)); // Then assertThat(mono).emitsCount(1); @@ -51,11 +50,10 @@ public class ChatHomeTestBase // When Mono mono = chatHome .getChatRoom(chatRoomId) - .log() + .log("testGetNonExistentChatroom") .retryWhen(Retry .backoff(5, Duration.ofSeconds(1)) - .filter(throwable -> throwable instanceof LoadInProgressException)) - .log(); + .filter(throwable -> throwable instanceof LoadInProgressException)); // Then assertThat(mono).sendsError(e -> diff --git a/src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeWithShardsTestBase.java b/src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeWithShardsTestBase.java index 74445708..85e187b2 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeWithShardsTestBase.java +++ b/src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeWithShardsTestBase.java @@ -28,11 +28,10 @@ public class ChatHomeWithShardsTestBase extends ChatHomeTestBase // When Mono mono = chatHome .getChatRoom(chatRoomId) - .log() + .log("testGetChatroomForNotOwnedShard") .retryWhen(Retry .backoff(5, Duration.ofSeconds(1)) - .filter(throwable -> throwable instanceof LoadInProgressException)) - .log(); + .filter(throwable -> throwable instanceof LoadInProgressException)); // Then assertThat(mono).sendsError(e ->