Skip to content
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 @@ -233,7 +233,7 @@ public void testPingFailure() {
}
}

@Test // (groups = "integration")
@Test(groups = "integration")
public void testTransaction() throws ClickHouseException {
if (isCloud()) return; //TODO: testTransaction - Revisit, see: https://github.com/ClickHouse/clickhouse-java/issues/1747
testAbortTransaction();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.Arrays;
import java.util.Properties;

@Test(groups = { "integration" })
public class AccessManagementTest extends JdbcIntegrationTest {
@BeforeMethod(groups = "integration")
public void setV1() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;

@Test(groups = { "integration" })
public class ClickHouseStatementTest extends JdbcIntegrationTest {
@BeforeMethod(groups = "integration")
public void setV1() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import static org.testng.Assert.assertThrows;

@Test(groups = { "integration" })
public class GenericJDBCTest extends JdbcIntegrationTest {
public Connection getConnection(Properties properties) throws SQLException {
if (properties == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.sql.Statement;
import java.util.Properties;

@Test(groups = { "integration" })
public class JdbcIssuesTest extends JdbcIntegrationTest {
@BeforeMethod(groups = "integration")
public void setV1() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@

import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

@Test(groups = "integration")
public class ClickHouseConnectionImplTest extends JdbcIntegrationTest {
@BeforeMethod(groups = "integration")
public void setV1() {
System.setProperty("clickhouse.jdbc.v1","true");
}
@Test(groups = "integration")
public void testManualCommit() throws SQLException {
if (isCloud()) return; //TODO: testManualCommit - Revisit, see: https://github.com/ClickHouse/clickhouse-java/issues/1747
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import static com.github.tomakehurst.wiremock.stubbing.Scenario.STARTED;
import static org.junit.Assert.fail;

@Test(groups = {"integration"})
public class HttpTransportTests extends BaseIntegrationTest {

@Test(groups = {"integration"},dataProvider = "testConnectionTTLProvider")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;

@Test(groups = {"integration"})
public class InsertTests extends BaseIntegrationTest {
private Client client;
private InsertSettings settings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
import java.util.stream.Collectors;
import java.util.stream.IntStream;

@Test(groups = {"integration"})
public class QueryTests extends BaseIntegrationTest {

private final static Random RANDOM = new Random();
Expand Down Expand Up @@ -314,7 +315,8 @@ public void testQueryAll() throws Exception {
public void testQueryAllSimple() throws Exception {
testQueryAllSimple(10);
}
public void testQueryAllSimple(int numberOfRecords) throws Exception {

void testQueryAllSimple(int numberOfRecords) throws Exception {
GenericRecord record = client.queryAll("SELECT number FROM system.numbers LIMIT " + numberOfRecords).stream().findFirst().get();
Assert.assertNotNull(record);
}
Expand Down Expand Up @@ -1304,7 +1306,7 @@ private static String sq(String str) {
return "\'" + str + "\'";
}

public void testDataTypes(List<String> columns, List<Supplier<String>> valueGenerators, List<Consumer<ClickHouseBinaryFormatReader>> verifiers) {
void testDataTypes(List<String> columns, List<Supplier<String>> valueGenerators, List<Consumer<ClickHouseBinaryFormatReader>> verifiers) {
final String table = "data_types_test_table";

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import static org.testng.Assert.assertThrows;
import static org.testng.Assert.assertTrue;

@Test(groups = { "integration" })
public class PreparedStatementTest extends JdbcIntegrationTest {

@Test(groups = { "integration" })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import static org.testng.Assert.assertTrue;


@Test(groups = { "integration" })
public class StatementTest extends JdbcIntegrationTest {
private static final Logger log = LoggerFactory.getLogger(StatementTest.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import static org.testng.Assert.*;


@Test(groups = { "integration" })
public class DatabaseMetaDataTest extends JdbcIntegrationTest {
@Test(groups = { "integration" })
public void testGetColumns() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import static org.testng.Assert.assertThrows;
import static org.testng.Assert.assertTrue;


@Test(groups = { "integration" })
public class ResultSetMetaDataImplTest extends JdbcIntegrationTest {
@Test(groups = { "integration" })
public void testGetColumnCount() throws Exception {
Expand Down Expand Up @@ -171,14 +171,14 @@ public void testGetColumnScale() throws Exception {
}
}

public static void assertColumnNames(ResultSet rs, String... names) throws Exception {
static void assertColumnNames(ResultSet rs, String... names) throws Exception {
ResultSetMetaData metadata = rs.getMetaData();
assertEquals(names.length, metadata.getColumnCount());
for (int i = 0; i < metadata.getColumnCount(); i++) {
assertEquals(names[i], metadata.getColumnName(i + 1));
}
}
public static void assertColumnTypes(ResultSet rs, String... types) throws Exception {
static void assertColumnTypes(ResultSet rs, String... types) throws Exception {
ResultSetMetaData metadata = rs.getMetaData();
assertEquals(types.length, metadata.getColumnCount());
for (int i = 0; i < metadata.getColumnCount(); i++) {
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,8 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<excludedGroups>${excludedGroups}</excludedGroups>
<groups>unit</groups>
<!-- run unit and ungroup tests, except integration group -->
<excludedGroups>integration</excludedGroups>
<skipTests>${skipUTs}</skipTests>
<useModulePath>false</useModulePath>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
Expand Down
Loading