From 038620fc523cfa42e5b8fe444e13d0fe18d9166c Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 19 Feb 2024 11:05:17 +0100 Subject: [PATCH] test: Introduced integration-tests for `NoStorageStorageStrategy` -- ALIGN --- ...thNoStorageAndShardingConfigurationIT.java | 21 ++++++++++++++++--- .../InMemoryWithNoStorageConfigurationIT.java | 21 ++++++++++++++++--- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageAndShardingConfigurationIT.java b/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageAndShardingConfigurationIT.java index fd2866b5..fb364182 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageAndShardingConfigurationIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageAndShardingConfigurationIT.java @@ -1,16 +1,31 @@ package de.juplo.kafka.chat.backend; +import org.junit.jupiter.api.Disabled; 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.storage-strategy=none", "chat.backend.inmemory.sharding-strategy=kafkalike", "chat.backend.inmemory.num-shards=10", "chat.backend.inmemory.owned-shards=2" }) -class InMemoryWithFilesAndShardingConfigurationIT extends AbstractConfigurationWithShardingIT +class InMemoryWithNoStorageAndShardingConfigurationIT extends AbstractConfigurationWithShardingIT { + @Override + @Disabled("Chat-Rooms cannot be restored, if storage is disabled") + void testRestoredChatRoomsCanBeListed() {} + + @Override + @Disabled("Chat-Rooms cannot be restored, if storage is disabled") + void testRestoredChatRoomHasExpectedDetails() {} + + @Override + @Disabled("Chat-Rooms cannot be restored, if storage is disabled") + void testRestoredMessageForUteHasExpectedText() {} + + @Override + @Disabled("Chat-Rooms cannot be restored, if storage is disabled") + void testRestoredMessageForPeterHasExpectedText() {} } diff --git a/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageConfigurationIT.java b/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageConfigurationIT.java index 2ff9e111..89748a18 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageConfigurationIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageConfigurationIT.java @@ -1,5 +1,6 @@ package de.juplo.kafka.chat.backend; +import org.junit.jupiter.api.Disabled; import org.springframework.boot.test.context.SpringBootTest; @@ -7,8 +8,22 @@ import org.springframework.boot.test.context.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 + "chat.backend.inmemory.storage-strategy=none" }) +class InMemoryWithNoStorageConfigurationIT extends AbstractConfigurationIT { + @Override + @Disabled("Chat-Rooms cannot be restored, if storage is disabled") + void testRestoredChatRoomsCanBeListed() {} + + @Override + @Disabled("Chat-Rooms cannot be restored, if storage is disabled") + void testRestoredChatRoomHasExpectedDetails() {} + + @Override + @Disabled("Chat-Rooms cannot be restored, if storage is disabled") + void testRestoredMessageForUteHasExpectedText() {} + + @Override + @Disabled("Chat-Rooms cannot be restored, if storage is disabled") + void testRestoredMessageForPeterHasExpectedText() {} } -- 2.20.1