Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1935764: Explicitly pick account for heartbeat tests on jenkins #2085

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading