Skip to content

Commit

Permalink
Only run the test for http implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
zhicwu committed Jul 8, 2022
1 parent 890f602 commit 24035e6
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1261,12 +1261,14 @@ public void testTempTable() throws Exception {
@Test(groups = "integration")
public void testErrorDuringInsert() throws Exception {
ClickHouseNode server = getServer();
if (server.getProtocol() != ClickHouseProtocol.HTTP) {
return;
}
ClickHouseClient.send(server, "drop table if exists error_during_insert",
"create table error_during_insert(n UInt64, flag UInt8)engine=Null").get();
boolean success = true;
try (ClickHouseClient client = getClient();
ClickHouseResponse resp = client.connect(getServer()).write()
.format(ClickHouseFormat.RowBinary)
ClickHouseResponse resp = client.connect(getServer()).write().format(ClickHouseFormat.RowBinary)
.query("insert into error_during_insert select number, throwIf(number>=100000000) from numbers(500000000)")
.executeAndWait()) {
for (ClickHouseRecord r : resp.records()) {
Expand All @@ -1284,11 +1286,15 @@ public void testErrorDuringInsert() throws Exception {

@Test(groups = "integration")
public void testErrorDuringQuery() throws Exception {
ClickHouseNode server = getServer();
if (server.getProtocol() != ClickHouseProtocol.HTTP) {
return;
}
String query = "select number, throwIf(number>=100000000) from numbers(500000000)";
long count = 0L;
try (ClickHouseClient client = getClient();
ClickHouseResponse resp = client.connect(getServer())
.format(ClickHouseFormat.RowBinaryWithNamesAndTypes).query(query).executeAndWait()) {
ClickHouseResponse resp = client.connect(server).format(ClickHouseFormat.RowBinaryWithNamesAndTypes)
.query(query).executeAndWait()) {
for (ClickHouseRecord r : resp.records()) {
// does not work which may relate to deserialization failure
// java.lang.AssertionError: expected [99764115] but found [4121673519155408707]
Expand Down

0 comments on commit 24035e6

Please sign in to comment.