Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-jy committed Jun 11, 2024
1 parent 7be0919 commit 968bebe
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@

import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

import org.junit.Test;

Expand Down
15 changes: 7 additions & 8 deletions src/test/java/net/snowflake/client/jdbc/ConnectionIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import net.snowflake.client.RunningOnGithubAction;
import net.snowflake.client.TestUtil;
import net.snowflake.client.category.TestCategoryConnection;
import net.snowflake.client.core.SFBaseSession;
import net.snowflake.client.core.SFSession;
import net.snowflake.common.core.SqlState;
import org.apache.commons.codec.binary.Base64;
Expand Down Expand Up @@ -1030,13 +1029,13 @@ public void testFailOverOrgAccount() throws SQLException {
}
}

@Test
public void testSFBaseSession() throws SQLException {
try (Connection con = getConnection()) {
assertNull(con.unwrap(SFBaseSession.class).getServerUrl());
expectFeatureSFException(() -> con.unwrap(SFBaseSession.class).addProperty("user", "a"));
}
}
// @Test
// public void testSFBaseSession() throws SQLException {
// try (Connection con = getConnection()) {
// assertNull(con.unwrap(SFBaseSession.class).getServerUrl());
// expectFeatureSFException(() -> con.unwrap(SFBaseSession.class).addProperty("user", "a"));
// }
// }

private class ConcurrentConnections implements Runnable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,6 @@ private void checkAlreadyClosed(ResultSet resultSet) throws SQLException {
expectResultSetAlreadyClosedException(resultSet::getStatement);
}

private void checkeNotSupportedMethodsinAlreadyClosedStatus(SnowflakeResultSetV1 resultSet)
throws Throwable {
expectSnowflakeLoggedFeatureNotSupportedException(resultSet::getStatus);
expectSnowflakeLoggedFeatureNotSupportedException(resultSet::getStatusV2);
expectSnowflakeLoggedFeatureNotSupportedException(() -> resultSet.getArray(-1));
}

/**
* These tests are specific to an empty resultset object
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import java.sql.CallableStatement;
Expand Down

0 comments on commit 968bebe

Please sign in to comment.