WIP
authorKai Moritz <kai@juplo.de>
Fri, 1 Sep 2023 17:40:12 +0000 (19:40 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 1 Sep 2023 17:40:12 +0000 (19:40 +0200)
src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeTestBase.java
src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeWithShardsTestBase.java

index 4bf1189..3164de5 100644 (file)
@@ -29,8 +29,8 @@ public class ChatHomeTestBase
     UUID chatRoomId = UUID.fromString("5c73531c-6fc4-426c-adcb-afc5c140a0f7");
 
     // When
-    Mono<ChatRoom> mono = chatHome
-        .getChatRoom(chatRoomId)
+    Mono<ChatRoom> mono = Mono
+        .defer(() -> chatHome.getChatRoom(chatRoomId))
         .log("testGetExistingChatroom")
         .retryWhen(Retry
             .backoff(5, Duration.ofSeconds(1))
@@ -48,8 +48,8 @@ public class ChatHomeTestBase
     UUID chatRoomId = UUID.fromString("7f59ec77-832e-4a17-8d22-55ef46242c17");
 
     // When
-    Mono<ChatRoom> mono = chatHome
-        .getChatRoom(chatRoomId)
+    Mono<ChatRoom> mono = Mono
+        .defer(() -> chatHome.getChatRoom(chatRoomId))
         .log("testGetNonExistentChatroom")
         .retryWhen(Retry
             .backoff(5, Duration.ofSeconds(1))
index 85e187b..a89da6b 100644 (file)
@@ -26,8 +26,8 @@ public class ChatHomeWithShardsTestBase extends ChatHomeTestBase
     UUID chatRoomId = UUID.fromString("4e7246a6-29ae-43ea-b56f-669c3481ac19");
 
     // When
-    Mono<ChatRoom> mono = chatHome
-        .getChatRoom(chatRoomId)
+    Mono<ChatRoom> mono = Mono
+        .defer(() -> chatHome.getChatRoom(chatRoomId))
         .log("testGetChatroomForNotOwnedShard")
         .retryWhen(Retry
             .backoff(5, Duration.ofSeconds(1))