Skip to content

Commit

Permalink
SNOW-1496324 Review Ignored Test for GCP test environment (#2041)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-vb authored Jan 23, 2025
1 parent e517038 commit 979a161
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public class ConnectionFipsIT extends AbstractDriverIT {
"javax.net.ssl.trustStoreType";
private static final String JAVA_SYSTEM_PROPERTY_SSL_PROTOCOLS = "jdk.tls.client.protocols";
private static final String JAVA_SYSTEM_PROPERTY_SSL_CIPHERSUITES = "jdk.tls.client.cipherSuites";
private static final String JAVA_SYSTEM_PROPERTY_SSL_NAMEDGROUPS = "jdk.tls.namedGroups";

private static String JAVA_SYSTEM_PROPERTY_SSL_KEYSTORE_TYPE_ORIGINAL_VALUE;
private static String JAVA_SYSTEM_PROPERTY_SSL_TRUSTSTORE_TYPE_ORIGINAL_VALUE;
Expand All @@ -108,6 +109,8 @@ public class ConnectionFipsIT extends AbstractDriverIT {
@BeforeAll
public static void setup() throws Exception {
System.setProperty("javax.net.debug", "ssl");
// Setting up the named group to avoid test failure on GCP environment.
System.setProperty(JAVA_SYSTEM_PROPERTY_SSL_NAMEDGROUPS, "secp256r1, secp384r1, ffdhe2048, ffdhe3072");
// get keystore types for BouncyCastle libraries
JAVA_SYSTEM_PROPERTY_SSL_KEYSTORE_TYPE_ORIGINAL_VALUE =
System.getProperty(JAVA_SYSTEM_PROPERTY_SSL_KEYSTORE_TYPE);
Expand Down Expand Up @@ -207,7 +210,8 @@ public static void teardown() throws Exception {
JAVA_SYSTEM_PROPERTY_SSL_TRUSTSTORE_TYPE_ORIGINAL_VALUE);
}
System.clearProperty(SecurityUtil.ENABLE_BOUNCYCASTLE_PROVIDER_JVM);

// clear the named group.
System.clearProperty(JAVA_SYSTEM_PROPERTY_SSL_NAMEDGROUPS);
// attempts an SSL connection to Google
// connectToGoogle();
}
Expand Down Expand Up @@ -291,10 +295,8 @@ public void testConnectUsingKeyPair() throws Exception {

/**
* Test case for connecting with FIPS and executing a query.
* Currently ignored execution on GCP due to exception thrown "SSlException Could not generate XDH keypair"
*/
@Test
@DontRunOnGCP
public void connectWithFipsAndQuery() throws SQLException {
try (Connection con = getConnection()) {
Statement statement = con.createStatement();
Expand Down

0 comments on commit 979a161

Please sign in to comment.