From 9934af4ef960faf3ab48b476822f647d3e1f1177 Mon Sep 17 00:00:00 2001 From: Atanas Atanasov Date: Thu, 12 Dec 2024 15:17:29 +0200 Subject: [PATCH] temporary disabling test for checking env var configs Signed-off-by: Atanas Atanasov --- .../ServerMappedConfigSourceInitializerTest.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/server/src/test/java/com/hedera/block/server/config/ServerMappedConfigSourceInitializerTest.java b/server/src/test/java/com/hedera/block/server/config/ServerMappedConfigSourceInitializerTest.java index a37e58b6..7738568f 100644 --- a/server/src/test/java/com/hedera/block/server/config/ServerMappedConfigSourceInitializerTest.java +++ b/server/src/test/java/com/hedera/block/server/config/ServerMappedConfigSourceInitializerTest.java @@ -34,7 +34,7 @@ import java.util.Set; import java.util.function.Predicate; import java.util.stream.Stream; -import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -52,15 +52,8 @@ class ServerMappedConfigSourceInitializerTest { new ConfigMapping("server.maxMessageSizeBytes", "SERVER_MAX_MESSAGE_SIZE_BYTES"), new ConfigMapping("server.port", "SERVER_PORT"), }; - private static final Set> SUPPORTED_CONFIG_DATA_TYPES = - new BlockNodeConfigExtension().getConfigDataTypes(); - private static MappedConfigSource toTest; - - @BeforeAll - static void setUp() { - toTest = ServerMappedConfigSourceInitializer.getMappedConfigSource(); - } + @Disabled("This test is disabled because it will start passing only after #285 gets implemented") @ParameterizedTest @MethodSource("allConfigDataTypes") void testVerifyAllFieldsInRecordsAreMapped(final Class config) { @@ -126,11 +119,13 @@ private static String transformToEnvVarConvention(final String input) { return resolved.toUpperCase(); } + @SuppressWarnings("unchecked") private static Queue extractConfigMappings() throws ReflectiveOperationException { final Field configMappings = MappedConfigSource.class.getDeclaredField("configMappings"); try { configMappings.setAccessible(true); - return (Queue) configMappings.get(toTest); + return (Queue) + configMappings.get(ServerMappedConfigSourceInitializer.getMappedConfigSource()); } finally { configMappings.setAccessible(false); }