Skip to content

Commit

Permalink
Skip gRPC tests unless ClickHouse is 22.3+
Browse files Browse the repository at this point in the history
  • Loading branch information
zhicwu committed Apr 16, 2022
1 parent 795dd30 commit 14f856a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.apache.commons.compress.compressors.lz4.FramedLZ4CompressorInputStream;
import org.testng.Assert;
import org.testng.SkipException;
import org.testng.annotations.Test;

import java.io.ByteArrayInputStream;
Expand All @@ -13,6 +14,7 @@
import com.clickhouse.client.ClickHouseRecord;
import com.clickhouse.client.ClickHouseResponse;
import com.clickhouse.client.ClickHouseResponseSummary;
import com.clickhouse.client.ClickHouseVersion;
import com.clickhouse.client.ClientIntegrationTest;
import com.clickhouse.client.config.ClickHouseClientOption;
import com.clickhouse.client.ClickHouseFormat;
Expand All @@ -21,6 +23,10 @@
public class ClickHouseGrpcClientTest extends ClientIntegrationTest {
@Override
protected ClickHouseProtocol getProtocol() {
if (!ClickHouseVersion.of(System.getProperty("clickhouseVersion", "latest")).check("[22.3,)")) {
throw new SkipException("Skip gRPC client testing unless ClickHouse is 22.3 or above");
}

return ClickHouseProtocol.GRPC;
}

Expand Down

0 comments on commit 14f856a

Please sign in to comment.