chore: Switched the default-configuration to sharding `none`
authorKai Moritz <kai@juplo.de>
Sat, 14 Jan 2023 16:40:21 +0000 (17:40 +0100)
committerKai Moritz <kai@juplo.de>
Wed, 25 Jan 2023 21:01:47 +0000 (22:01 +0100)
src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java
src/test/java/de/juplo/kafka/chat/backend/InMemoryWithFilesAndShardingConfigurationIT.java

index 5cd4535..177d4f5 100644 (file)
@@ -22,9 +22,9 @@ public class ChatBackendProperties
   @Setter
   public static class InMemoryServicesProperties
   {
-    private ShardingStrategyType shardingStrategy = ShardingStrategyType.kafkalike;
-    private int numShards = 10;
-    private int[] ownedShards = { 2 };
+    private ShardingStrategyType shardingStrategy = ShardingStrategyType.none;
+    private int numShards = 1;
+    private int[] ownedShards = new int[] { 0 };
     private StorageStrategyType storageStrategy = StorageStrategyType.files;
     private String storageDirectory = Paths.get(System.getProperty("java.io.tmpdir"),"chat", "backend").toString();
   }
index 5138dee..d792d25 100644 (file)
@@ -7,7 +7,9 @@ import org.springframework.boot.test.context.SpringBootTest;
     webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
     properties = {
         "chat.backend.inmemory.storage-directory=target/test-classes/data/files",
-        "chat.backend.inmemory.sharding-strategy=kafkalike" })
+        "chat.backend.inmemory.sharding-strategy=kafkalike",
+        "chat.backend.inmemory.num-shards=10",
+        "chat.backend.inmemory.owned-shards=2" })
 class InMemoryWithFilesAndShardingConfigurationIT extends AbstractConfigurationIT
 {
 }