Skip to content

Commit 142944b

Browse files
committed
Remove hard-coded protocol
1 parent 3535d11 commit 142944b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clickhouse-jdbc/src/test/java/com/clickhouse/jdbc/ClickHouseDataSourceTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
import org.testng.Assert;
99
import org.testng.annotations.Test;
1010

11-
import com.clickhouse.client.ClickHouseProtocol;
1211
import com.clickhouse.client.config.ClickHouseClientOption;
1312
import com.clickhouse.client.config.ClickHouseDefaults;
1413

1514
public class ClickHouseDataSourceTest extends JdbcIntegrationTest {
1615
@Test(groups = "integration")
1716
public void testGetConnection() throws SQLException {
18-
String url = "jdbc:ch://" + getServerAddress(DEFAULT_PROTOCOL);
19-
String urlWithCredentials = "jdbc:ch://default@" + getServerAddress(ClickHouseProtocol.HTTP);
17+
String url = "jdbc:ch:" + DEFAULT_PROTOCOL.name() + "://" + getServerAddress(DEFAULT_PROTOCOL);
18+
String urlWithCredentials = "jdbc:ch:" + DEFAULT_PROTOCOL.name() + "://default@"
19+
+ getServerAddress(DEFAULT_PROTOCOL);
2020
String clientName = "client1";
2121
int maxExecuteTime = 1234;
2222
boolean continueBatchOnError = true;

0 commit comments

Comments
 (0)