Skip to content

Commit 4c9c3bf

Browse files
committed
fix tests
1 parent ee99f4f commit 4c9c3bf

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

clickhouse-jdbc/src/test/java/com/clickhouse/jdbc/internal/ClickHouseConnectionImplTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@
1212

1313
import org.testng.Assert;
1414
import org.testng.annotations.BeforeClass;
15+
import org.testng.annotations.BeforeMethod;
1516
import org.testng.annotations.Test;
1617

18+
@Test(groups = "integration")
1719
public class ClickHouseConnectionImplTest extends JdbcIntegrationTest {
20+
@BeforeMethod(groups = "integration")
21+
public void setV1() {
22+
System.setProperty("clickhouse.jdbc.v1","true");
23+
}
1824
@Test(groups = "integration")
1925
public void testManualCommit() throws SQLException {
2026
if (isCloud()) return; //TODO: testManualCommit - Revisit, see: https://github.com/ClickHouse/clickhouse-java/issues/1747

client-v2/src/test/java/com/clickhouse/client/query/QueryTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@ public void testQueryAll() throws Exception {
315315
public void testQueryAllSimple() throws Exception {
316316
testQueryAllSimple(10);
317317
}
318-
public void testQueryAllSimple(int numberOfRecords) throws Exception {
318+
319+
void testQueryAllSimple(int numberOfRecords) throws Exception {
319320
GenericRecord record = client.queryAll("SELECT number FROM system.numbers LIMIT " + numberOfRecords).stream().findFirst().get();
320321
Assert.assertNotNull(record);
321322
}
@@ -1305,7 +1306,7 @@ private static String sq(String str) {
13051306
return "\'" + str + "\'";
13061307
}
13071308

1308-
public void testDataTypes(List<String> columns, List<Supplier<String>> valueGenerators, List<Consumer<ClickHouseBinaryFormatReader>> verifiers) {
1309+
void testDataTypes(List<String> columns, List<Supplier<String>> valueGenerators, List<Consumer<ClickHouseBinaryFormatReader>> verifiers) {
13091310
final String table = "data_types_test_table";
13101311

13111312
try {

jdbc-v2/src/test/java/com/clickhouse/jdbc/metadata/ResultSetMetaDataImplTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,14 @@ public void testGetColumnScale() throws Exception {
171171
}
172172
}
173173

174-
public static void assertColumnNames(ResultSet rs, String... names) throws Exception {
174+
static void assertColumnNames(ResultSet rs, String... names) throws Exception {
175175
ResultSetMetaData metadata = rs.getMetaData();
176176
assertEquals(names.length, metadata.getColumnCount());
177177
for (int i = 0; i < metadata.getColumnCount(); i++) {
178178
assertEquals(names[i], metadata.getColumnName(i + 1));
179179
}
180180
}
181-
public static void assertColumnTypes(ResultSet rs, String... types) throws Exception {
181+
static void assertColumnTypes(ResultSet rs, String... types) throws Exception {
182182
ResultSetMetaData metadata = rs.getMetaData();
183183
assertEquals(types.length, metadata.getColumnCount());
184184
for (int i = 0; i < metadata.getColumnCount(); i++) {

0 commit comments

Comments
 (0)