diff --git a/src/test/java/net/snowflake/client/jdbc/DatabaseMetaDataResultsetIT.java b/src/test/java/net/snowflake/client/jdbc/DatabaseMetaDataResultsetIT.java index febcd4501..ccc984e3c 100644 --- a/src/test/java/net/snowflake/client/jdbc/DatabaseMetaDataResultsetIT.java +++ b/src/test/java/net/snowflake/client/jdbc/DatabaseMetaDataResultsetIT.java @@ -8,7 +8,6 @@ import static org.junit.Assert.assertTrue; import java.math.BigDecimal; -import java.sql.Connection; import java.sql.Date; import java.sql.ResultSet; import java.sql.SQLException; @@ -23,7 +22,7 @@ import org.junit.experimental.categories.Category; @Category(TestCategoryOthers.class) -public class DatabaseMetaDataResultsetIT extends BaseJDBCTest { +public class DatabaseMetaDataResultsetIT extends BaseJDBCWithSharedConnectionIT { private static final int columnCount = 9; private static final int INT_DATA = 1; private static final String TEXT_DATA = "TEST"; @@ -98,8 +97,7 @@ public void testRowIndex() throws SQLException { } private ResultSet getResultSet(boolean doNext) throws SQLException { - Connection con = getConnection(); - Statement st = con.createStatement(); + Statement st = connection.createStatement(); ResultSet resultSet = new SnowflakeDatabaseMetaDataResultSet(columnNames, columnTypeNames, columnTypes, rows, st); if (doNext) { diff --git a/src/test/java/net/snowflake/client/jdbc/MultiStatementLatestIT.java b/src/test/java/net/snowflake/client/jdbc/MultiStatementLatestIT.java index 59f5ba795..eedf56114 100644 --- a/src/test/java/net/snowflake/client/jdbc/MultiStatementLatestIT.java +++ b/src/test/java/net/snowflake/client/jdbc/MultiStatementLatestIT.java @@ -9,11 +9,11 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; -import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import net.snowflake.client.category.TestCategoryStatement; +import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -24,21 +24,19 @@ * both the latest and oldest supported driver run the tests. */ @Category(TestCategoryStatement.class) -public class MultiStatementLatestIT extends BaseJDBCTest { +public class MultiStatementLatestIT extends BaseJDBCWithSharedConnectionIT { protected static String queryResultFormat = "json"; - public static Connection getConnection() throws SQLException { - Connection conn = BaseJDBCTest.getConnection(); - try (Statement stmt = conn.createStatement()) { + @Before + public void setQueryResultFormat() throws SQLException { + try (Statement stmt = connection.createStatement()) { stmt.execute("alter session set jdbc_query_result_format = '" + queryResultFormat + "'"); } - return conn; } @Test public void testMultiStmtExecute() throws SQLException { - try (Connection connection = getConnection(); - Statement statement = connection.createStatement()) { + try (Statement statement = connection.createStatement()) { statement.unwrap(SnowflakeStatement.class).setParameter("MULTI_STATEMENT_COUNT", 3); String multiStmtQuery = "create or replace temporary table test_multi (cola int);\n" @@ -74,8 +72,7 @@ public void testMultiStmtExecute() throws SQLException { @Test public void testMultiStmtTransaction() throws SQLException { - try (Connection connection = getConnection(); - Statement statement = connection.createStatement()) { + try (Statement statement = connection.createStatement()) { try { statement.execute( "create or replace table test_multi_txn(c1 number, c2 string)" + " as select 10, 'z'"); @@ -120,8 +117,7 @@ public void testMultiStmtTransaction() throws SQLException { @Test public void testMultiStmtExecuteUpdate() throws SQLException { - try (Connection connection = getConnection(); - Statement statement = connection.createStatement()) { + try (Statement statement = connection.createStatement()) { String multiStmtQuery = "create or replace temporary table test_multi (cola int);\n" + "insert into test_multi VALUES (1), (2);\n" @@ -157,8 +153,7 @@ public void testMultiStmtExecuteUpdate() throws SQLException { @Test public void testMultiStmtTransactionRollback() throws SQLException { - try (Connection connection = getConnection(); - Statement statement = connection.createStatement()) { + try (Statement statement = connection.createStatement()) { try { statement.execute( "create or replace table test_multi_txn_rb(c1 number, c2 string)" @@ -207,8 +202,7 @@ public void testMultiStmtTransactionRollback() throws SQLException { @Test public void testMultiStmtExecuteQuery() throws SQLException { - try (Connection connection = getConnection(); - Statement statement = connection.createStatement()) { + try (Statement statement = connection.createStatement()) { String multiStmtQuery = "select 1;\n" + "create or replace temporary table test_multi (cola int);\n" @@ -254,8 +248,7 @@ public void testMultiStmtExecuteQuery() throws SQLException { @Test public void testMultiStmtUpdateCount() throws SQLException { - try (Connection connection = getConnection(); - Statement statement = connection.createStatement()) { + try (Statement statement = connection.createStatement()) { statement.unwrap(SnowflakeStatement.class).setParameter("MULTI_STATEMENT_COUNT", 2); boolean isResultSet = statement.execute( @@ -280,8 +273,7 @@ public void testMultiStmtUpdateCount() throws SQLException { /** Test use of anonymous blocks (SNOW-758262) */ @Test public void testAnonymousBlocksUse() throws SQLException { - try (Connection connection = getConnection(); - Statement statement = connection.createStatement()) { + try (Statement statement = connection.createStatement()) { statement.execute("create or replace table tab758262(c1 number)"); // Test anonymous block with multistatement int multistatementcount = 2; diff --git a/src/test/java/net/snowflake/client/jdbc/OpenGroupCLIFuncIT.java b/src/test/java/net/snowflake/client/jdbc/OpenGroupCLIFuncIT.java index d767456a2..d68dc8fc5 100644 --- a/src/test/java/net/snowflake/client/jdbc/OpenGroupCLIFuncIT.java +++ b/src/test/java/net/snowflake/client/jdbc/OpenGroupCLIFuncIT.java @@ -10,17 +10,18 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import net.snowflake.client.AbstractDriverIT; import net.snowflake.client.TestUtil; import net.snowflake.client.category.TestCategoryOthers; +import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; /** Test OpenGroup CLI */ @Category(TestCategoryOthers.class) -public class OpenGroupCLIFuncIT extends BaseJDBCTest { - public static Connection getConnection() throws SQLException { - Connection connection = AbstractDriverIT.getConnection(); +public class OpenGroupCLIFuncIT extends BaseJDBCWithSharedConnectionIT { + + @BeforeClass + public static void setSessionTimezone() throws SQLException { try (Statement statement = connection.createStatement()) { statement.execute( "alter session set " @@ -31,114 +32,101 @@ public static Connection getConnection() throws SQLException { + "TIMESTAMP_LTZ_OUTPUT_FORMAT='DY, DD MON YYYY HH24:MI:SS TZHTZM'," + "TIMESTAMP_NTZ_OUTPUT_FORMAT='DY, DD MON YYYY HH24:MI:SS TZHTZM'"); } - return connection; } @Test public void testStringFunction() throws SQLException { - try (Connection connection = getConnection()) { - testFunction(connection, "select {fn ASCII('snowflake')}", "115"); - testFunction(connection, "select {fn CHAR(115)}", "s"); - testFunction(connection, "select {fn CONCAT('snow', 'flake')}", "snowflake"); - // DIFFERENCE is not supported - // testFunction(connection, "select {fn DIFFERENCE('snow', 'flake')}", "snowflake"); - testFunction(connection, "select {fn INSERT('snowflake', 2, 3, 'insert')}", "sinsertflake"); - testFunction(connection, "select {fn LCASE('SNOWflake')}", "snowflake"); - testFunction(connection, "select {fn LEFT('snowflake', 4)}", "snow"); - testFunction(connection, "select {fn LENGTH(' snowflake ')}", "11"); - testFunction(connection, "select {fn LOCATE('str', 'strstrstr', 2)}", "4"); - testFunction(connection, "select {fn LTRIM(' snowflake ')}", "snowflake "); - testFunction(connection, "select {fn REPEAT('snow', 3)}", "snowsnowsnow"); - testFunction(connection, "select {fn REPLACE('snowssnowsn', 'sn', 'aa')}", "aaowsaaowaa"); - testFunction(connection, "select {fn RIGHT('snowflake', 5)}", "flake"); - testFunction(connection, "select {fn RTRIM(' snowflake ')}", " snowflake"); - // SOUNDEX is not supported - // testFunction(connection, "select {fn SOUNDEX('snowflake')}", " snowflake"); - testFunction(connection, "select {fn SPACE(4)}", " "); - testFunction(connection, "select {fn SUBSTRING('snowflake', 2, 3)}", "now"); - testFunction(connection, "select {fn UCASE('snowflake')}", "SNOWFLAKE"); - } + testFunction(connection, "select {fn ASCII('snowflake')}", "115"); + testFunction(connection, "select {fn CHAR(115)}", "s"); + testFunction(connection, "select {fn CONCAT('snow', 'flake')}", "snowflake"); + // DIFFERENCE is not supported + // testFunction(connection, "select {fn DIFFERENCE('snow', 'flake')}", "snowflake"); + testFunction(connection, "select {fn INSERT('snowflake', 2, 3, 'insert')}", "sinsertflake"); + testFunction(connection, "select {fn LCASE('SNOWflake')}", "snowflake"); + testFunction(connection, "select {fn LEFT('snowflake', 4)}", "snow"); + testFunction(connection, "select {fn LENGTH(' snowflake ')}", "11"); + testFunction(connection, "select {fn LOCATE('str', 'strstrstr', 2)}", "4"); + testFunction(connection, "select {fn LTRIM(' snowflake ')}", "snowflake "); + testFunction(connection, "select {fn REPEAT('snow', 3)}", "snowsnowsnow"); + testFunction(connection, "select {fn REPLACE('snowssnowsn', 'sn', 'aa')}", "aaowsaaowaa"); + testFunction(connection, "select {fn RIGHT('snowflake', 5)}", "flake"); + testFunction(connection, "select {fn RTRIM(' snowflake ')}", " snowflake"); + // SOUNDEX is not supported + // testFunction(connection, "select {fn SOUNDEX('snowflake')}", " snowflake"); + testFunction(connection, "select {fn SPACE(4)}", " "); + testFunction(connection, "select {fn SUBSTRING('snowflake', 2, 3)}", "now"); + testFunction(connection, "select {fn UCASE('snowflake')}", "SNOWFLAKE"); } @Test public void testDateTimeFunction() throws SQLException { - try (Connection connection = getConnection()) { - // testFunction(connection, "select {fn CURDATE()}",""); - // testFunction(connection, "select {fn CURTIME()}",""); - testFunction(connection, "select {fn DAYNAME('2016-5-25')}", "Wed"); - testFunction(connection, "select {fn DAYOFMONTH(to_date('2016-5-25'))}", "25"); - testFunction(connection, "select {fn DAYOFWEEK(to_date('2016-5-25'))}", "3"); - testFunction(connection, "select {fn DAYOFYEAR(to_date('2016-5-25'))}", "146"); - testFunction(connection, "select {fn HOUR(to_timestamp('2016-5-25 12:34:56.789789'))}", "12"); - testFunction( - connection, "select {fn MINUTE(to_timestamp('2016-5-25 12:34:56.789789'))}", "34"); - testFunction(connection, "select {fn MONTH(to_date('2016-5-25'))}", "5"); - testFunction(connection, "select {fn MONTHNAME(to_date('2016-5-25'))}", "May"); - // testFunction(connection, "select {fn NOW()}", "May"); - testFunction(connection, "select {fn QUARTER(to_date('2016-5-25'))}", "2"); - testFunction( - connection, "select {fn SECOND(to_timestamp('2016-5-25 12:34:56.789789'))}", "56"); - testFunction( - connection, - "select {fn TIMESTAMPADD(SQL_TSI_FRAC_SECOND, 1000, " - + "to_timestamp('2016-5-25 12:34:56.789789'))}", - "Wed, 25 May 2016 12:34:56 -0700"); - testFunction( - connection, - "select {fn TIMESTAMPADD(SQL_TSI_SECOND, 1, " - + "to_timestamp('2016-5-25 12:34:56.789789'))}", - "Wed, 25 May 2016 12:34:57 -0700"); - testFunction( - connection, - "select {fn TIMESTAMPADD(SQL_TSI_MINUTE, 1, " - + "to_timestamp('2016-5-25 12:34:56.789789'))}", - "Wed, 25 May 2016 12:35:56 -0700"); - testFunction( - connection, - "select {fn TIMESTAMPADD(SQL_TSI_HOUR, 1, " - + "to_timestamp('2016-5-25 12:34:56.789789'))}", - "Wed, 25 May 2016 13:34:56 -0700"); - testFunction( - connection, - "select {fn TIMESTAMPADD(SQL_TSI_DAY, 1, " - + "to_timestamp('2016-5-25 12:34:56.789789'))}", - "Thu, 26 May 2016 12:34:56 -0700"); - testFunction( - connection, - "select {fn TIMESTAMPADD(SQL_TSI_MONTH, 1, " - + "to_timestamp('2016-5-25 12:34:56.789789'))}", - "Sat, 25 Jun 2016 12:34:56 -0700"); - testFunction( - connection, - "select {fn TIMESTAMPADD(SQL_TSI_QUARTER, 1, " - + "to_timestamp('2016-5-25 12:34:56.789789'))}", - "Thu, 25 Aug 2016 12:34:56 -0700"); - testFunction( - connection, - "select {fn TIMESTAMPADD(SQL_TSI_YEAR, 1, " - + "to_timestamp('2016-5-25 12:34:56.789789'))}", - "Thu, 25 May 2017 12:34:56 -0700"); - testFunction( - connection, - "select {fn TIMESTAMPDIFF(SQL_TSI_SECOND, " - + "to_timestamp('2016-5-25 12:34:56.789789'), to_timestamp('2016-5-25 12:34:57.789789'))}", - "1"); - testFunction(connection, "select {fn WEEK(to_timestamp('2016-5-25 12:34:56.789789'))}", "21"); - testFunction( - connection, "select {fn YEAR(to_timestamp('2016-5-25 12:34:56.789789'))}", "2016"); - } + // testFunction(connection, "select {fn CURDATE()}",""); + // testFunction(connection, "select {fn CURTIME()}",""); + testFunction(connection, "select {fn DAYNAME('2016-5-25')}", "Wed"); + testFunction(connection, "select {fn DAYOFMONTH(to_date('2016-5-25'))}", "25"); + testFunction(connection, "select {fn DAYOFWEEK(to_date('2016-5-25'))}", "3"); + testFunction(connection, "select {fn DAYOFYEAR(to_date('2016-5-25'))}", "146"); + testFunction(connection, "select {fn HOUR(to_timestamp('2016-5-25 12:34:56.789789'))}", "12"); + testFunction(connection, "select {fn MINUTE(to_timestamp('2016-5-25 12:34:56.789789'))}", "34"); + testFunction(connection, "select {fn MONTH(to_date('2016-5-25'))}", "5"); + testFunction(connection, "select {fn MONTHNAME(to_date('2016-5-25'))}", "May"); + // testFunction(connection, "select {fn NOW()}", "May"); + testFunction(connection, "select {fn QUARTER(to_date('2016-5-25'))}", "2"); + testFunction(connection, "select {fn SECOND(to_timestamp('2016-5-25 12:34:56.789789'))}", "56"); + testFunction( + connection, + "select {fn TIMESTAMPADD(SQL_TSI_FRAC_SECOND, 1000, " + + "to_timestamp('2016-5-25 12:34:56.789789'))}", + "Wed, 25 May 2016 12:34:56 -0700"); + testFunction( + connection, + "select {fn TIMESTAMPADD(SQL_TSI_SECOND, 1, " + + "to_timestamp('2016-5-25 12:34:56.789789'))}", + "Wed, 25 May 2016 12:34:57 -0700"); + testFunction( + connection, + "select {fn TIMESTAMPADD(SQL_TSI_MINUTE, 1, " + + "to_timestamp('2016-5-25 12:34:56.789789'))}", + "Wed, 25 May 2016 12:35:56 -0700"); + testFunction( + connection, + "select {fn TIMESTAMPADD(SQL_TSI_HOUR, 1, " + "to_timestamp('2016-5-25 12:34:56.789789'))}", + "Wed, 25 May 2016 13:34:56 -0700"); + testFunction( + connection, + "select {fn TIMESTAMPADD(SQL_TSI_DAY, 1, " + "to_timestamp('2016-5-25 12:34:56.789789'))}", + "Thu, 26 May 2016 12:34:56 -0700"); + testFunction( + connection, + "select {fn TIMESTAMPADD(SQL_TSI_MONTH, 1, " + + "to_timestamp('2016-5-25 12:34:56.789789'))}", + "Sat, 25 Jun 2016 12:34:56 -0700"); + testFunction( + connection, + "select {fn TIMESTAMPADD(SQL_TSI_QUARTER, 1, " + + "to_timestamp('2016-5-25 12:34:56.789789'))}", + "Thu, 25 Aug 2016 12:34:56 -0700"); + testFunction( + connection, + "select {fn TIMESTAMPADD(SQL_TSI_YEAR, 1, " + "to_timestamp('2016-5-25 12:34:56.789789'))}", + "Thu, 25 May 2017 12:34:56 -0700"); + testFunction( + connection, + "select {fn TIMESTAMPDIFF(SQL_TSI_SECOND, " + + "to_timestamp('2016-5-25 12:34:56.789789'), to_timestamp('2016-5-25 12:34:57.789789'))}", + "1"); + testFunction(connection, "select {fn WEEK(to_timestamp('2016-5-25 12:34:56.789789'))}", "21"); + testFunction(connection, "select {fn YEAR(to_timestamp('2016-5-25 12:34:56.789789'))}", "2016"); } @Test public void testSystemFunctions() throws SQLException { - try (Connection connection = getConnection()) { - testFunction(connection, "select {fn DATABASE()}", connection.getCatalog()); - testFunction(connection, "select {fn IFNULL(NULL, 1)}", "1"); - testFunction( - connection, - "select {fn USER()}", - TestUtil.systemGetEnv("SNOWFLAKE_TEST_USER").toUpperCase()); - } + testFunction(connection, "select {fn DATABASE()}", connection.getCatalog()); + testFunction(connection, "select {fn IFNULL(NULL, 1)}", "1"); + testFunction( + connection, + "select {fn USER()}", + TestUtil.systemGetEnv("SNOWFLAKE_TEST_USER").toUpperCase()); } static void testFunction(Connection connection, String sql, String expected) throws SQLException { diff --git a/src/test/java/net/snowflake/client/jdbc/PreparedMultiStmtArrowIT.java b/src/test/java/net/snowflake/client/jdbc/PreparedMultiStmtArrowIT.java deleted file mode 100644 index 54a3e8ec1..000000000 --- a/src/test/java/net/snowflake/client/jdbc/PreparedMultiStmtArrowIT.java +++ /dev/null @@ -1,12 +0,0 @@ -package net.snowflake.client.jdbc; - -import net.snowflake.client.category.TestCategoryArrow; -import org.junit.experimental.categories.Category; - -@Category(TestCategoryArrow.class) -public class PreparedMultiStmtArrowIT extends PreparedMultiStmtIT { - public PreparedMultiStmtArrowIT() { - super(); - queryResultFormat = "arrow"; - } -} diff --git a/src/test/java/net/snowflake/client/jdbc/PreparedMultiStmtIT.java b/src/test/java/net/snowflake/client/jdbc/PreparedMultiStmtIT.java index 3d1997193..224c538d0 100644 --- a/src/test/java/net/snowflake/client/jdbc/PreparedMultiStmtIT.java +++ b/src/test/java/net/snowflake/client/jdbc/PreparedMultiStmtIT.java @@ -5,39 +5,52 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; -import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import net.snowflake.client.category.TestCategoryStatement; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +@RunWith(Parameterized.class) @Category(TestCategoryStatement.class) -public class PreparedMultiStmtIT extends BaseJDBCTest { +public class PreparedMultiStmtIT extends BaseJDBCWithSharedConnectionIT { - protected static String queryResultFormat = "json"; + @Parameterized.Parameters(name = "format={0}") + public static Object[][] data() { + // all tests in this class need to run for both query result formats json and arrow + return new Object[][] {{"JSON"}, {"Arrow"}}; + } + + protected String queryResultFormat; + private static SnowflakeConnectionV1 sfConnectionV1; + + public PreparedMultiStmtIT(String queryResultFormat) { + this.queryResultFormat = queryResultFormat; + this.sfConnectionV1 = (SnowflakeConnectionV1) connection; + } - public static Connection getConnection() throws SQLException { - Connection conn = BaseJDBCTest.getConnection(); - try (Statement stmt = conn.createStatement()) { + @Before + public void setSessionResultFormat() throws SQLException { + try (Statement stmt = connection.createStatement()) { stmt.execute("alter session set jdbc_query_result_format = '" + queryResultFormat + "'"); } - return conn; } @Test public void testExecuteUpdateCount() throws Exception { - try (SnowflakeConnectionV1 connection = (SnowflakeConnectionV1) getConnection(); - Statement statement = connection.createStatement()) { + try (Statement statement = sfConnectionV1.createStatement()) { try { statement.execute("alter session set MULTI_STATEMENT_COUNT=0"); statement.execute("create or replace table test_multi_bind(c1 number)"); try (PreparedStatement preparedStatement = - connection.prepareStatement( + sfConnectionV1.prepareStatement( "insert into test_multi_bind(c1) values(?); insert into " + "test_multi_bind values (?), (?)")) { @@ -76,14 +89,13 @@ public void testExecuteUpdateCount() throws Exception { /** Less bindings than expected in statement */ @Test public void testExecuteLessBindings() throws Exception { - try (SnowflakeConnectionV1 connection = (SnowflakeConnectionV1) getConnection(); - Statement statement = connection.createStatement()) { + try (Statement statement = sfConnectionV1.createStatement()) { try { statement.execute("alter session set MULTI_STATEMENT_COUNT=0"); statement.execute("create or replace table test_multi_bind(c1 number)"); try (PreparedStatement preparedStatement = - connection.prepareStatement( + sfConnectionV1.prepareStatement( "insert into test_multi_bind(c1) values(?); insert into " + "test_multi_bind values (?), (?)")) { @@ -109,14 +121,13 @@ public void testExecuteLessBindings() throws Exception { @Test public void testExecuteMoreBindings() throws Exception { - try (SnowflakeConnectionV1 connection = (SnowflakeConnectionV1) getConnection(); - Statement statement = connection.createStatement()) { + try (Statement statement = sfConnectionV1.createStatement()) { try { statement.execute("alter session set MULTI_STATEMENT_COUNT=0"); statement.execute("create or replace table test_multi_bind(c1 number)"); try (PreparedStatement preparedStatement = - connection.prepareStatement( + sfConnectionV1.prepareStatement( "insert into test_multi_bind(c1) values(?); insert into " + "test_multi_bind values (?), (?)")) { @@ -156,12 +167,11 @@ public void testExecuteMoreBindings() throws Exception { @Test public void testExecuteQueryBindings() throws Exception { - try (SnowflakeConnectionV1 connection = (SnowflakeConnectionV1) getConnection(); - Statement statement = connection.createStatement()) { + try (Statement statement = sfConnectionV1.createStatement()) { statement.execute("alter session set MULTI_STATEMENT_COUNT=0"); try (PreparedStatement preparedStatement = - connection.prepareStatement("select ?; select ?, ?; select ?, ?, ?")) { + sfConnectionV1.prepareStatement("select ?; select ?, ?; select ?, ?, ?")) { assertThat(preparedStatement.getParameterMetaData().getParameterCount(), is(6)); @@ -199,12 +209,11 @@ public void testExecuteQueryBindings() throws Exception { @Test public void testExecuteQueryNoBindings() throws Exception { - try (SnowflakeConnectionV1 connection = (SnowflakeConnectionV1) getConnection(); - Statement statement = connection.createStatement()) { + try (Statement statement = sfConnectionV1.createStatement()) { statement.execute("alter session set MULTI_STATEMENT_COUNT=0"); try (PreparedStatement preparedStatement = - connection.prepareStatement("select 10; select 20, 30; select 40, 50, 60")) { + sfConnectionV1.prepareStatement("select 10; select 20, 30; select 40, 50, 60")) { assertThat(preparedStatement.getParameterMetaData().getParameterCount(), is(0));