From: Kai Moritz Date: Mon, 19 Feb 2024 10:05:17 +0000 (+0100) Subject: test: Introduced integration-tests for `NoStorageStorageStrategy` X-Git-Tag: rebase--2024-02-20--10-29~8 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=038620fc523cfa42e5b8fe444e13d0fe18d9166c;p=demos%2Fkafka%2Fchat test: Introduced integration-tests for `NoStorageStorageStrategy` -- ALIGN --- 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() {} }