Conversation
jdbc-v2/src/main/java/com/clickhouse/jdbc/internal/JdbcConfiguration.java
Outdated
Show resolved
Hide resolved
jdbc-v2/src/main/java/com/clickhouse/jdbc/internal/JdbcConfiguration.java
Outdated
Show resolved
Hide resolved
jdbc-v2/src/test/java/com/clickhouse/jdbc/internal/JdbcConfigurationTest.java
Outdated
Show resolved
Hide resolved
Client V2 CoverageCoverage Report
Class Coverage
|
JDBC V2 CoverageCoverage Report
Class Coverage
|
JDBC V1 CoverageCoverage Report
Class Coverage
|
Client V1 CoverageCoverage Report
Class Coverage
|
| Map.of(JdbcConfiguration.USE_SSL_PROP, "true")) | ||
| .withExpectedConnectionURL("https://localhost:8443"), // ssl should not be passed to client | ||
| new JdbcConfigurationTestData("jdbc:clickhouse://[::1]") | ||
| new JdbcConfigurationTestData("jdbc:clickhouse://[::1]:8123") |
There was a problem hiding this comment.
Duplicate test entries introduced during port migration
Low Severity
The newly added test entry at line 39 (jdbc:clickhouse://[::1]:8123) is an exact duplicate of the pre-existing entry at line 41. Similarly, the entry added at line 77 (jdbc:clickhouse://localhost:8123/?custom_key1=val1) duplicates the pre-existing entry at line 88. Both arose from mechanically replacing no-port test URLs with port-explicit versions without noticing identical entries already existed. The old no-port entries tested distinct scenarios; the replacements add no new coverage.
Additional Locations (1)
|
| new JdbcConfigurationTestData("jdbc:clickhouse:http://localhost"), | ||
| new JdbcConfigurationTestData("jdbc:clickhouse:https://localhost") | ||
| .withExpectedConnectionURL("https://localhost:8443"), | ||
| new JdbcConfigurationTestData("jdbc:ch://localhost:8123") |
There was a problem hiding this comment.
We only test here the happy path lets add some negative tests





Summary
Closes #2753
Checklist
Delete items not relevant to your PR:
Note
Medium Risk
Breaking change for clients that relied on implicit ports in JDBC URLs; could cause connection failures until URLs are updated.
Overview
Removes JDBC URL default-port normalization in
jdbc-v2soJdbcConfiguration.createConnectionURL()no longer appends:8123/:8443when the port is omitted, relying solely onURI.create(...).toASCIIString().Updates URL parsing tests to require explicit ports in connection URLs (including
jdbc:ch://...) and documents this as a breaking change inCHANGELOG.md(issue #2753).Written by Cursor Bugbot for commit 7879a7d. This will update automatically on new commits. Configure here.