|
1 | 1 | package com.clickhouse.jdbc; |
2 | 2 |
|
3 | 3 | import com.clickhouse.client.api.DataTypeUtils; |
| 4 | +import com.clickhouse.client.api.internal.ServerSettings; |
4 | 5 | import com.clickhouse.data.ClickHouseColumn; |
5 | 6 | import com.clickhouse.data.ClickHouseDataType; |
6 | 7 | import com.clickhouse.data.ClickHouseVersion; |
@@ -956,7 +957,7 @@ void testBatchInsertTextStatement(String sql) throws Exception { |
956 | 957 | String table = "test_batch_text"; |
957 | 958 | long seed = System.currentTimeMillis(); |
958 | 959 | Random rnd = new Random(seed); |
959 | | - try (Connection conn = getJdbcConnection()) { |
| 960 | + try (Connection conn = getJdbcConnection(Map.of(ASYNC_INSERT_SETTING_KEY, ServerSettings.OFF))) { |
960 | 961 |
|
961 | 962 | try (Statement stmt = conn.createStatement()) { |
962 | 963 | stmt.execute("CREATE TABLE IF NOT EXISTS " + table + |
@@ -1007,7 +1008,7 @@ void testBatchInsertNoValuesReuse() throws Exception { |
1007 | 1008 | String sql = "INSERT INTO %s (v1, v2) VALUES (?, ?)"; |
1008 | 1009 | long seed = System.currentTimeMillis(); |
1009 | 1010 | Random rnd = new Random(seed); |
1010 | | - try (Connection conn = getJdbcConnection()) { |
| 1011 | + try (Connection conn = getJdbcConnection(Map.of(ASYNC_INSERT_SETTING_KEY, ServerSettings.OFF))) { |
1011 | 1012 |
|
1012 | 1013 | try (Statement stmt = conn.createStatement()) { |
1013 | 1014 | stmt.execute("CREATE TABLE IF NOT EXISTS " + table + |
@@ -1062,7 +1063,7 @@ void testBatchInsertValuesReuse() throws Exception { |
1062 | 1063 | String sql = "INSERT INTO %s (v1, v2) VALUES (1, ?)"; |
1063 | 1064 | long seed = System.currentTimeMillis(); |
1064 | 1065 | Random rnd = new Random(seed); |
1065 | | - try (Connection conn = getJdbcConnection()) { |
| 1066 | + try (Connection conn = getJdbcConnection(Map.of(ASYNC_INSERT_SETTING_KEY, ServerSettings.OFF))) { |
1066 | 1067 |
|
1067 | 1068 | try (Statement stmt = conn.createStatement()) { |
1068 | 1069 | stmt.execute("CREATE TABLE IF NOT EXISTS " + table + |
@@ -1266,7 +1267,7 @@ public void testJdbcEscapeSyntax() throws Exception { |
1266 | 1267 |
|
1267 | 1268 | @Test(groups = {"integration "}) |
1268 | 1269 | public void testStatementsWithDatabaseInTableIdentifier() throws Exception { |
1269 | | - try (Connection conn = getJdbcConnection()) { |
| 1270 | + try (Connection conn = getJdbcConnection(Map.of(ASYNC_INSERT_SETTING_KEY, ServerSettings.OFF))) { |
1270 | 1271 | final String db1Name = conn.getSchema() + "_db1"; |
1271 | 1272 | final String table1Name = "table1"; |
1272 | 1273 | try (Statement stmt = conn.createStatement()) { |
@@ -1296,7 +1297,7 @@ public void testStatementsWithDatabaseInTableIdentifier() throws Exception { |
1296 | 1297 |
|
1297 | 1298 | @Test(groups = {"integration "}) |
1298 | 1299 | public void testNullValues() throws Exception { |
1299 | | - try (Connection conn = getJdbcConnection()) { |
| 1300 | + try (Connection conn = getJdbcConnection(Map.of(ASYNC_INSERT_SETTING_KEY, ServerSettings.OFF))) { |
1300 | 1301 | final String table = "test_null_values"; |
1301 | 1302 | try (Statement stmt = conn.createStatement()) { |
1302 | 1303 | stmt.execute("DROP TABLE IF EXISTS " + table); |
|
0 commit comments