diff --git a/jdbc-v2/src/test/java/com/clickhouse/jdbc/internal/JdbcConfigurationTest.java b/jdbc-v2/src/test/java/com/clickhouse/jdbc/internal/JdbcConfigurationTest.java index 3114a4a32..ec64ae98f 100644 --- a/jdbc-v2/src/test/java/com/clickhouse/jdbc/internal/JdbcConfigurationTest.java +++ b/jdbc-v2/src/test/java/com/clickhouse/jdbc/internal/JdbcConfigurationTest.java @@ -17,19 +17,15 @@ public void testCleanUrl() { String cleanUrl = configuration.cleanUrl(url); assertEquals(cleanUrl, "http://localhost:8123/clickhouse?param1=value1¶m2=value2"); + // we do not support guessing by port numbers url = "jdbc:clickhouse://localhost:8443/clickhouse?param1=value1¶m2=value2"; cleanUrl = configuration.cleanUrl(url); - assertEquals(cleanUrl, "https://localhost:8443/clickhouse?param1=value1¶m2=value2"); + assertEquals(cleanUrl, "http://localhost:8443/clickhouse?param1=value1¶m2=value2"); Properties info = new Properties(); - info.setProperty("ssl", "true"); - configuration = new JdbcConfiguration("jdbc:clickhouse://localhost:8123/clickhouse?param1=value1¶m2=value2", info); - cleanUrl = configuration.cleanUrl(url); - assertEquals(cleanUrl, "https://localhost:8123/clickhouse?param1=value1¶m2=value2"); - - info.setProperty("ssl", "false"); - configuration = new JdbcConfiguration("jdbc:clickhouse://localhost:8443/clickhouse?param1=value1¶m2=value2", info); + configuration = new JdbcConfiguration("jdbc:clickhouse:https://localhost:8123/clickhouse?param1=value1¶m2=value2", info); + url = "jdbc:clickhouse:https://localhost:8443/clickhouse?param1=value1¶m2=value2"; cleanUrl = configuration.cleanUrl(url); - assertEquals(cleanUrl, "http://localhost:8443/clickhouse?param1=value1¶m2=value2"); + assertEquals(cleanUrl, "https://localhost:8443/clickhouse?param1=value1¶m2=value2"); } }