Skip to content

Commit

Permalink
Merge pull request #319 from ClickHouse/update-integration-version
Browse files Browse the repository at this point in the history
Update ClickHouseSinkConnectorIntegrationTest.java
  • Loading branch information
Paultagoras authored Feb 21, 2024
2 parents 26e980e + 7948400 commit 0e64c14
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.clickhouse.client.config.ClickHouseProxyType;
import com.clickhouse.kafka.connect.ClickHouseSinkConnector;
import com.clickhouse.kafka.connect.sink.db.helper.ClickHouseHelperClient;
import com.clickhouse.kafka.connect.sink.helper.ClickHouseTestHelpers;
import eu.rekawek.toxiproxy.Proxy;
import eu.rekawek.toxiproxy.ToxiproxyClient;
import org.junit.jupiter.api.*;
Expand Down Expand Up @@ -40,7 +41,7 @@ public static void setup() {
connectorPath.add(confluentArchive);
confluentPlatform = new ConfluentPlatform(network, connectorPath);

db = new ClickHouseContainer("clickhouse/clickhouse-server:22.5").withNetwork(network).withNetworkAliases("clickhouse");
db = new ClickHouseContainer(ClickHouseTestHelpers.CLICKHOUSE_DOCKER_IMAGE).withNetwork(network).withNetworkAliases("clickhouse");
db.start();

toxiproxy = new ToxiproxyContainer("ghcr.io/shopify/toxiproxy:2.7.0").withNetwork(network).withNetworkAliases("toxiproxy");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

public class ClickHouseTestHelpers {
private static final Logger LOGGER = LoggerFactory.getLogger(ClickHouseTestHelpers.class);
public static final String CLICKHOUSE_DOCKER_IMAGE = "clickhouse/clickhouse-server:23.8";
public static void dropTable(ClickHouseHelperClient chc, String tableName) {
String dropTable = String.format("DROP TABLE IF EXISTS `%s`", tableName);
try (ClickHouseClient client = ClickHouseClient.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class ClickHouseSinkTaskMappingTest {

@BeforeAll
public static void setup() {
db = new ClickHouseContainer("clickhouse/clickhouse-server:23.9");
db = new ClickHouseContainer(ClickHouseTestHelpers.CLICKHOUSE_DOCKER_IMAGE);
db.start();

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ClickHouseSinkTaskSchemalessProxyTest {
@BeforeAll
public static void setup() throws IOException {
Network network = Network.newNetwork();
db = new ClickHouseContainer("clickhouse/clickhouse-server:23.9").withNetwork(network).withNetworkAliases("clickhouse");
db = new ClickHouseContainer(ClickHouseTestHelpers.CLICKHOUSE_DOCKER_IMAGE).withNetwork(network).withNetworkAliases("clickhouse");
db.start();

toxiproxy = new ToxiproxyContainer("ghcr.io/shopify/toxiproxy:2.7.0").withNetwork(network).withNetworkAliases("toxiproxy");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ClickHouseSinkTaskSchemalessTest {

@BeforeAll
public static void setup() {
db = new ClickHouseContainer("clickhouse/clickhouse-server:23.9");
db = new ClickHouseContainer(ClickHouseTestHelpers.CLICKHOUSE_DOCKER_IMAGE);
db.start();

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.clickhouse.client.ClickHouseResponseSummary;
import com.clickhouse.kafka.connect.ClickHouseSinkConnector;
import com.clickhouse.kafka.connect.sink.db.helper.ClickHouseHelperClient;
import com.clickhouse.kafka.connect.sink.helper.ClickHouseTestHelpers;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import org.apache.kafka.common.record.TimestampType;
Expand Down Expand Up @@ -34,7 +35,7 @@ public class ClickHouseSinkTaskStringTest {

@BeforeAll
public static void setup() {
db = new ClickHouseContainer("clickhouse/clickhouse-server:23.9");
db = new ClickHouseContainer(ClickHouseTestHelpers.CLICKHOUSE_DOCKER_IMAGE);
db.start();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ClickHouseSinkTaskWithSchemaProxyTest {
@BeforeAll
public static void setup() throws IOException {
Network network = Network.newNetwork();
db = new org.testcontainers.clickhouse.ClickHouseContainer("clickhouse/clickhouse-server:23.9").withNetwork(network).withNetworkAliases("clickhouse");
db = new org.testcontainers.clickhouse.ClickHouseContainer(ClickHouseTestHelpers.CLICKHOUSE_DOCKER_IMAGE).withNetwork(network).withNetworkAliases("clickhouse");
db.start();

toxiproxy = new ToxiproxyContainer("ghcr.io/shopify/toxiproxy:2.7.0").withNetwork(network).withNetworkAliases("toxiproxy");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ClickHouseSinkTaskWithSchemaTest {

@BeforeAll
public static void setup() {
db = new ClickHouseContainer("clickhouse/clickhouse-server:23.9");
db = new ClickHouseContainer(ClickHouseTestHelpers.CLICKHOUSE_DOCKER_IMAGE);
db.start();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.clickhouse.kafka.connect.sink.db.helper.ClickHouseHelperClient;

public class ClickHouseTestHelpers {
public static final String CLICKHOUSE_DOCKER_IMAGE = "clickhouse/clickhouse-server:23.8";
public static ClickHouseResponseSummary dropTable(ClickHouseHelperClient chc, String tableName) {
String dropTable = String.format("DROP TABLE IF EXISTS `%s`", tableName);
try (ClickHouseClient client = ClickHouseClient.builder()
Expand Down

0 comments on commit 0e64c14

Please sign in to comment.