File tree 2 files changed +8
-2
lines changed
clickhouse-client/src/test/java/com/clickhouse/client
clickhouse-jdbc/src/test/java/com/clickhouse/jdbc
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 45
45
import com .clickhouse .client .data .ClickHouseStringValue ;
46
46
47
47
import org .testng .Assert ;
48
+ import org .testng .SkipException ;
48
49
import org .testng .annotations .DataProvider ;
49
50
import org .testng .annotations .Test ;
50
51
@@ -1262,7 +1263,7 @@ public void testTempTable() throws Exception {
1262
1263
public void testErrorDuringInsert () throws Exception {
1263
1264
ClickHouseNode server = getServer ();
1264
1265
if (server .getProtocol () != ClickHouseProtocol .HTTP ) {
1265
- return ;
1266
+ throw new SkipException ( "Skip as only http implementation works well" ) ;
1266
1267
}
1267
1268
ClickHouseClient .send (server , "drop table if exists error_during_insert" ,
1268
1269
"create table error_during_insert(n UInt64, flag UInt8)engine=Null" ).get ();
@@ -1288,7 +1289,7 @@ public void testErrorDuringInsert() throws Exception {
1288
1289
public void testErrorDuringQuery () throws Exception {
1289
1290
ClickHouseNode server = getServer ();
1290
1291
if (server .getProtocol () != ClickHouseProtocol .HTTP ) {
1291
- return ;
1292
+ throw new SkipException ( "Skip as only http implementation works well" ) ;
1292
1293
}
1293
1294
String query = "select number, throwIf(number>=100000000) from numbers(500000000)" ;
1294
1295
long count = 0L ;
Original file line number Diff line number Diff line change 33
33
import com .clickhouse .client .ClickHouseDataType ;
34
34
import com .clickhouse .client .ClickHouseParameterizedQuery ;
35
35
import com .clickhouse .client .ClickHouseProtocol ;
36
+ import com .clickhouse .client .ClickHouseRequest ;
36
37
import com .clickhouse .client .ClickHouseValues ;
37
38
import com .clickhouse .client .config .ClickHouseClientOption ;
38
39
import com .clickhouse .client .data .ClickHouseDateTimeValue ;
39
40
import com .clickhouse .client .http .config .ClickHouseHttpOption ;
40
41
41
42
import org .testng .Assert ;
43
+ import org .testng .SkipException ;
42
44
import org .testng .annotations .DataProvider ;
43
45
import org .testng .annotations .Test ;
44
46
@@ -73,6 +75,9 @@ public void testSocketTimeout() throws SQLException {
73
75
props .setProperty ("database" , "system" );
74
76
try (ClickHouseConnection conn = newConnection (props );
75
77
ClickHouseStatement stmt = conn .createStatement ()) {
78
+ if (stmt .unwrap (ClickHouseRequest .class ).getServer ().getProtocol () != ClickHouseProtocol .HTTP ) {
79
+ throw new SkipException ("Skip as only http implementation works well" );
80
+ }
76
81
stmt .executeQuery ("select sleep(3)" );
77
82
Assert .fail ("Should throw timeout exception" );
78
83
} catch (SQLException e ) {
You can’t perform that action at this time.
0 commit comments