File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
main/java/com/clickhouse/jdbc
test/java/com/clickhouse/jdbc Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -68,10 +68,12 @@ public static String getFrameworksDetected() {
6868
6969 }
7070
71- static {
71+ public static boolean isV2 () {
7272 String versionString = System .getProperty ("com.clickhouse.jdbc.version" , "v2" );
73- boolean useV2 = versionString != null && versionString .equalsIgnoreCase ("v2" );
73+ return versionString != null && versionString .equalsIgnoreCase ("v2" );
74+ }
7475
76+ static {
7577 String str = ClickHouseDriver .class .getPackage ().getImplementationVersion ();
7678 if (str != null && !str .isEmpty ()) {
7779 char [] chars = str .toCharArray ();
@@ -107,7 +109,7 @@ public static String getFrameworksDetected() {
107109
108110 clientSpecificOptions = Collections .unmodifiableMap (m );
109111
110- if (useV2 ) {
112+ if (isV2 () ) {
111113 com .clickhouse .jdbc .Driver .load ();
112114 } else {
113115 load ();
Original file line number Diff line number Diff line change 1919public class ClickHouseDataSourceTest extends JdbcIntegrationTest {
2020 @ Test (groups = "integration" )
2121 public void testHighAvailabilityConfig () throws SQLException {
22- if (isCloud ()) return ; //TODO: testHighAvailabilityConfig - Revisit, see: https://github.com/ClickHouse/clickhouse-java/issues/1747
22+ if (isCloud () && ! ClickHouseDriver . isV2 () ) return ; //TODO: testHighAvailabilityConfig - Revisit, see: https://github.com/ClickHouse/clickhouse-java/issues/1747
2323 String httpEndpoint = getEndpointString ();
2424 String grpcEndpoint = "grpc://" + getServerAddress (ClickHouseProtocol .GRPC ) + "/" ;
2525 String tcpEndpoint = "tcp://" + getServerAddress (ClickHouseProtocol .TCP ) + "/" ;
@@ -37,7 +37,7 @@ public void testHighAvailabilityConfig() throws SQLException {
3737
3838 @ Test // (groups = "integration")
3939 public void testMultiEndpoints () throws SQLException {
40- if (isCloud ()) return ; //TODO: testMultiEndpoints - Revisit, see: https://github.com/ClickHouse/clickhouse-java/issues/1747
40+ if (isCloud () && ! ClickHouseDriver . isV2 () ) return ; //TODO: testMultiEndpoints - Revisit, see: https://github.com/ClickHouse/clickhouse-java/issues/1747
4141 String httpEndpoint = getEndpointString ();
4242 String grpcEndpoint = "grpc://" + getServerAddress (ClickHouseProtocol .GRPC ) + "/" ;
4343 String tcpEndpoint = "tcp://" + getServerAddress (ClickHouseProtocol .TCP ) + "/" ;
You can’t perform that action at this time.
0 commit comments