Skip to content

Commit

Permalink
SNOW-1935764: Explicitly pick account for heartbeat tests on jenkins (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dprzybysz authored Feb 20, 2025
1 parent 808407a commit 7f998d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected void submitQuery(boolean useKeepAliveSession, int queryIdx)
"CLIENT_SESSION_KEEP_ALIVE",
useKeepAliveSession ? Boolean.TRUE.toString() : Boolean.FALSE.toString());

try (Connection connection = getConnection(sessionParams);
try (Connection connection = getConnection("s3testaccount", sessionParams);
Statement stmt = connection.createStatement();
// Query will take 5 seconds to run, but ResultSet will be returned immediately
ResultSet resultSet =
Expand Down Expand Up @@ -83,7 +83,7 @@ public void testAsynchronousQueryFailure() throws Exception {
@Test
@DontRunOnGithubActions
public void testIsValidWithInvalidSession() throws Exception {
try (Connection connection = getConnection()) {
try (Connection connection = getConnection("s3testaccount")) {
// assert that connection starts out valid
assertTrue(connection.isValid(5));
Thread.sleep(61000); // sleep 61 seconds to await session expiration time
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/net/snowflake/client/jdbc/HeartbeatIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected void submitQuery(boolean useKeepAliveSession, int queryIdx)
"CLIENT_SESSION_KEEP_ALIVE",
useKeepAliveSession ? Boolean.TRUE.toString() : Boolean.FALSE.toString());

try (Connection connection = getConnection(sessionParams);
try (Connection connection = getConnection("s3testaccount", sessionParams);
Statement statement = connection.createStatement()) {

Thread.sleep(61000); // sleep 61 seconds
Expand Down

0 comments on commit 7f998d9

Please sign in to comment.