From 51998163c3e7c63058ad6e4ab6535347f157357b Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 19 Feb 2024 11:01:13 +0100 Subject: [PATCH] test: Introduced integration-tests for `NoStorageStorageStrategy` -- COPY --- ...yWithNoStorageAndShardingConfigurationIT.java | 16 ++++++++++++++++ .../InMemoryWithNoStorageConfigurationIT.java | 14 ++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageAndShardingConfigurationIT.java create mode 100644 src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageConfigurationIT.java diff --git a/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageAndShardingConfigurationIT.java b/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageAndShardingConfigurationIT.java new file mode 100644 index 00000000..fd2866b5 --- /dev/null +++ b/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageAndShardingConfigurationIT.java @@ -0,0 +1,16 @@ +package de.juplo.kafka.chat.backend; + +import org.springframework.boot.test.context.SpringBootTest; + + +@SpringBootTest( + webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, + properties = { + "chat.backend.inmemory.storage-strategy=files", + "chat.backend.inmemory.storage-directory=target/test-classes/data/files", + "chat.backend.inmemory.sharding-strategy=kafkalike", + "chat.backend.inmemory.num-shards=10", + "chat.backend.inmemory.owned-shards=2" }) +class InMemoryWithFilesAndShardingConfigurationIT extends AbstractConfigurationWithShardingIT +{ +} diff --git a/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageConfigurationIT.java b/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageConfigurationIT.java new file mode 100644 index 00000000..2ff9e111 --- /dev/null +++ b/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageConfigurationIT.java @@ -0,0 +1,14 @@ +package de.juplo.kafka.chat.backend; + +import org.springframework.boot.test.context.SpringBootTest; + + +@SpringBootTest( + webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, + properties = { + "chat.backend.inmemory.sharding-strategy=none", + "chat.backend.inmemory.storage-strategy=files", + "chat.backend.inmemory.storage-directory=target/test-classes/data/files" }) +class InMemoryWithFilesConfigurationIT extends AbstractConfigurationIT +{ +} -- 2.20.1