Skip to content

Commit

Permalink
Fix failing test due to JDBC NPE in 3.14.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-japatel committed Nov 11, 2023
1 parent 7edb215 commit 03d498e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ protected static Properties generateProxyParametersIfRequired(Map<String, String
proxyProperties.put(SFSessionProperty.PROXY_USER.getPropertyKey(), username);
proxyProperties.put(SFSessionProperty.PROXY_PASSWORD.getPropertyKey(), password);
}
// There is a change in JDBC version 3.13.31 which causes NPE if this is not added.
// https://github.com/snowflakedb/snowflake-jdbc/blob/master/src/main/java/net/snowflake/client/jdbc/SnowflakeUtil.java#L614
proxyProperties.put(SFSessionProperty.GZIP_DISABLED.getPropertyKey(), "false");
}
return proxyProperties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ public void testInternalStageWithProxy() throws SnowflakeSQLException {
proxyProperties.put(SFSessionProperty.PROXY_PORT.getPropertyKey(), "3128");
proxyProperties.put(SFSessionProperty.PROXY_USER.getPropertyKey(), "admin");
proxyProperties.put(SFSessionProperty.PROXY_PASSWORD.getPropertyKey(), "test");
// required otherwise JDBC version 3.13.31 throws NPE
proxyProperties.put(SFSessionProperty.GZIP_DISABLED.getPropertyKey(), "false");

// Create new snowflake connection service
Map<String, String> config = TestUtils.getConf();
Expand Down

0 comments on commit 03d498e

Please sign in to comment.