WIP
authorKai Moritz <kai@juplo.de>
Fri, 1 Sep 2023 16:27:07 +0000 (18:27 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 1 Sep 2023 16:27:07 +0000 (18:27 +0200)
src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatRoomChannel.java
src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeTestBase.java
src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeWithShardsTestBase.java

index 92f294b..ad9531c 100644 (file)
@@ -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));
     }
 
index bbe62a1..4bf1189 100644 (file)
@@ -31,11 +31,10 @@ public class ChatHomeTestBase
     // When
     Mono<ChatRoom> 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<ChatRoom> 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 ->
index 7444570..85e187b 100644 (file)
@@ -28,11 +28,10 @@ public class ChatHomeWithShardsTestBase extends ChatHomeTestBase
     // When
     Mono<ChatRoom> 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 ->