Skip to content

Commit 95c580e

Browse files
authored
Merge pull request #2006 from ClickHouse/v2_fix_the_test
[jdbc-v2] Fixed tests
2 parents 5e304cb + 9a652d1 commit 95c580e

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

jdbc-v2/src/test/java/com/clickhouse/jdbc/internal/JdbcConfigurationTest.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,15 @@ public void testCleanUrl() {
1717
String cleanUrl = configuration.cleanUrl(url);
1818
assertEquals(cleanUrl, "http://localhost:8123/clickhouse?param1=value1&param2=value2");
1919

20+
// we do not support guessing by port numbers
2021
url = "jdbc:clickhouse://localhost:8443/clickhouse?param1=value1&param2=value2";
2122
cleanUrl = configuration.cleanUrl(url);
22-
assertEquals(cleanUrl, "https://localhost:8443/clickhouse?param1=value1&param2=value2");
23+
assertEquals(cleanUrl, "http://localhost:8443/clickhouse?param1=value1&param2=value2");
2324

2425
Properties info = new Properties();
25-
info.setProperty("ssl", "true");
26-
configuration = new JdbcConfiguration("jdbc:clickhouse://localhost:8123/clickhouse?param1=value1&param2=value2", info);
27-
cleanUrl = configuration.cleanUrl(url);
28-
assertEquals(cleanUrl, "https://localhost:8123/clickhouse?param1=value1&param2=value2");
29-
30-
info.setProperty("ssl", "false");
31-
configuration = new JdbcConfiguration("jdbc:clickhouse://localhost:8443/clickhouse?param1=value1&param2=value2", info);
26+
configuration = new JdbcConfiguration("jdbc:clickhouse:https://localhost:8123/clickhouse?param1=value1&param2=value2", info);
27+
url = "jdbc:clickhouse:https://localhost:8443/clickhouse?param1=value1&param2=value2";
3228
cleanUrl = configuration.cleanUrl(url);
33-
assertEquals(cleanUrl, "http://localhost:8443/clickhouse?param1=value1&param2=value2");
29+
assertEquals(cleanUrl, "https://localhost:8443/clickhouse?param1=value1&param2=value2");
3430
}
3531
}

0 commit comments

Comments
 (0)