From c269710383abc944d1a8dae49d78754d9c2946ba Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 29 Aug 2023 19:02:28 +0200 Subject: [PATCH] FIX:KAfkaChatHomeTEst --- .../kafka/chat/backend/persistence/kafka/ChatRoomChannel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 7659d1e1..10d26baa 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 @@ -372,12 +372,12 @@ public class ChatRoomChannel implements Runnable, ConsumerRebalanceListener { if (loadInProgress) { - throw new LoadInProgressException(shard); + return Mono.error(new LoadInProgressException(shard)); } if (!isShardOwned[shard]) { - throw new ShardNotOwnedException(shard); + return Mono.error(new ShardNotOwnedException(shard)); } return Mono.justOrEmpty(chatrooms[shard].get(id)); -- 2.20.1