Skip to content

Commit

Permalink
Added restoring static values in Session Util Test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-astachowski committed Nov 5, 2024
1 parent f8156ee commit aa592b1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/test/java/net/snowflake/client/core/SessionUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,25 @@
import net.snowflake.client.jdbc.MockConnectionTest;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URIBuilder;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

public class SessionUtilTest {
private static String originalUrlValue;
private static String originalRetryUrlPattern;

@BeforeAll
public static void saveStaticValues() {
originalUrlValue = SFTrustManager.SF_OCSP_RESPONSE_CACHE_SERVER_URL_VALUE;
originalRetryUrlPattern = SFTrustManager.SF_OCSP_RESPONSE_CACHE_SERVER_RETRY_URL_PATTERN;
}

@AfterAll
public static void restoreStaticValues() {
SFTrustManager.SF_OCSP_RESPONSE_CACHE_SERVER_URL_VALUE = originalUrlValue;
SFTrustManager.SF_OCSP_RESPONSE_CACHE_SERVER_RETRY_URL_PATTERN = originalRetryUrlPattern;
}

/** Test isPrefixEqual */
@Test
Expand Down

0 comments on commit aa592b1

Please sign in to comment.