Skip to content

Commit 979a161

Browse files
SNOW-1496324 Review Ignored Test for GCP test environment (#2041)
1 parent e517038 commit 979a161

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

FIPS/src/test/java/net/snowflake/client/jdbc/ConnectionFipsIT.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public class ConnectionFipsIT extends AbstractDriverIT {
9494
"javax.net.ssl.trustStoreType";
9595
private static final String JAVA_SYSTEM_PROPERTY_SSL_PROTOCOLS = "jdk.tls.client.protocols";
9696
private static final String JAVA_SYSTEM_PROPERTY_SSL_CIPHERSUITES = "jdk.tls.client.cipherSuites";
97+
private static final String JAVA_SYSTEM_PROPERTY_SSL_NAMEDGROUPS = "jdk.tls.namedGroups";
9798

9899
private static String JAVA_SYSTEM_PROPERTY_SSL_KEYSTORE_TYPE_ORIGINAL_VALUE;
99100
private static String JAVA_SYSTEM_PROPERTY_SSL_TRUSTSTORE_TYPE_ORIGINAL_VALUE;
@@ -108,6 +109,8 @@ public class ConnectionFipsIT extends AbstractDriverIT {
108109
@BeforeAll
109110
public static void setup() throws Exception {
110111
System.setProperty("javax.net.debug", "ssl");
112+
// Setting up the named group to avoid test failure on GCP environment.
113+
System.setProperty(JAVA_SYSTEM_PROPERTY_SSL_NAMEDGROUPS, "secp256r1, secp384r1, ffdhe2048, ffdhe3072");
111114
// get keystore types for BouncyCastle libraries
112115
JAVA_SYSTEM_PROPERTY_SSL_KEYSTORE_TYPE_ORIGINAL_VALUE =
113116
System.getProperty(JAVA_SYSTEM_PROPERTY_SSL_KEYSTORE_TYPE);
@@ -207,7 +210,8 @@ public static void teardown() throws Exception {
207210
JAVA_SYSTEM_PROPERTY_SSL_TRUSTSTORE_TYPE_ORIGINAL_VALUE);
208211
}
209212
System.clearProperty(SecurityUtil.ENABLE_BOUNCYCASTLE_PROVIDER_JVM);
210-
213+
// clear the named group.
214+
System.clearProperty(JAVA_SYSTEM_PROPERTY_SSL_NAMEDGROUPS);
211215
// attempts an SSL connection to Google
212216
// connectToGoogle();
213217
}
@@ -291,10 +295,8 @@ public void testConnectUsingKeyPair() throws Exception {
291295

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

0 commit comments

Comments
 (0)