Skip to content

Commit

Permalink
Try previous jdbc version
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-psaha committed Jan 8, 2024
1 parent 1f996b7 commit 3037880
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<shadeBase>net.snowflake.ingest.internal</shadeBase>
<slf4j.version>1.7.36</slf4j.version>
<snappy.version>1.1.10.4</snappy.version>
<snowjdbc.version>3.14.4</snowjdbc.version>
<snowjdbc.version>3.14.3</snowjdbc.version>
<yetus.version>0.13.0</yetus.version>
</properties>

Expand Down
3 changes: 2 additions & 1 deletion src/test/java/net/snowflake/ingest/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private static void init() throws Exception {
KeyFactory kf = KeyFactory.getInstance("RSA");

PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(encoded);
privateKey = kf.generatePrivate(keySpec);
privateKey = Utils.parsePrivateKey(privateKeyPem);
keyPair = Utils.createKeyPairFromPrivateKey(privateKey);
} else {
user = dummyUser;
Expand Down Expand Up @@ -284,6 +284,7 @@ public static Connection getConnection(boolean isStreamingConnection) throws Exc
props.put("warehouse", warehouse);
props.put("client_session_keep_alive", "true");
props.put("privateKey", privateKey);
props.put("role", "ACCOUNTADMIN");

if (isStreamingConnection) {
streamingConn = DriverManager.getConnection(connectString, props);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public void before() throws Exception {
conn.createStatement().execute(String.format("use warehouse %s;", TestUtils.getWarehouse()));

Properties props = TestUtils.getProperties(Constants.BdecVersion.THREE, false);
props.setProperty("url", "https://psaha_test.preprod5.us-west-2.aws.snowflakecomputing.com");
if (props.getProperty(ROLE).equals("DEFAULT_ROLE")) {
props.setProperty(ROLE, "ACCOUNTADMIN");
}
Expand Down

0 comments on commit 3037880

Please sign in to comment.