Skip to content

Commit

Permalink
Added restoring static values in Trust Manager Test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-astachowski committed Nov 5, 2024
1 parent aa592b1 commit cabb3af
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/java/net/snowflake/client/core/SFTrustManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cabb3af

Please sign in to comment.