From cabb3af05e3f81993a29a02002e026ac6bd683c6 Mon Sep 17 00:00:00 2001 From: sfc-gh-astachowski Date: Tue, 5 Nov 2024 10:34:27 +0100 Subject: [PATCH] Added restoring static values in Trust Manager Test --- .../snowflake/client/core/SFTrustManagerTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/java/net/snowflake/client/core/SFTrustManagerTest.java b/src/test/java/net/snowflake/client/core/SFTrustManagerTest.java index a231c881e..77a06cb2a 100644 --- a/src/test/java/net/snowflake/client/core/SFTrustManagerTest.java +++ b/src/test/java/net/snowflake/client/core/SFTrustManagerTest.java @@ -11,10 +11,24 @@ import java.util.Properties; import net.snowflake.client.jdbc.SnowflakeResultSetSerializable; import net.snowflake.client.jdbc.SnowflakeResultSetSerializableV1; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; public class SFTrustManagerTest { /** Test building OCSP retry URL */ + static String originalRetryUrlPattern; + + @BeforeAll + public static void saveStaticValues() { + originalRetryUrlPattern = SFTrustManager.SF_OCSP_RESPONSE_CACHE_SERVER_RETRY_URL_PATTERN; + } + + @AfterAll + public static void restoreStaticValues() { + SFTrustManager.SF_OCSP_RESPONSE_CACHE_SERVER_RETRY_URL_PATTERN = originalRetryUrlPattern; + } + @Test public void testBuildRetryURL() throws Exception { // private link