1818
1919public class JdbcConfigurationTest {
2020
21+
2122 @ Test (dataProvider = "testConnectionUrlDataProvider" )
2223 public void testConnectionUrl (String jdbcUrl , String connectionUrl , Properties properties , Map <String , String > expectedClientProps ) throws Exception {
2324 JdbcConfiguration configuration = new JdbcConfiguration (jdbcUrl , properties );
@@ -38,7 +39,7 @@ public static Object[][] testConnectionUrlDataProvider() {
3839 Map <String , String > useSSLParams = Map .of ("ssl" , "true" );
3940 Map <String , String > withListParams = Map .of ("database" , "default" , "param1" , "value1" , "custom_header1" , "val1,val2,val3" , "user" , "default" , "password" , "" );
4041 Map <String , String > withListParamsQuotes = Map .of ("database" , "default" , "param1" , "value1" , "custom_header1" , "\" role 1,3,4\" ,'val2',val3" , "user" , "default" , "password" , "" );
41-
42+ Map < String , String > useDatabaseSSLParams = Map . of ( "database" , "clickhouse" , "ssl" , "true" , "user" , "default" , "password" , "" );
4243
4344 return new Object [][] {
4445 {"jdbc:clickhouse://localhost:8123/" , "http://localhost:8123" , defaultProps , defaultParams },
@@ -47,7 +48,7 @@ public static Object[][] testConnectionUrlDataProvider() {
4748 {"jdbc:clickhouse://localhost:8443/" , "https://localhost:8443" , useSSL , useSSLParams },
4849 {"jdbc:clickhouse://localhost:8443/default?param1=value1&custom_header1=val1,val2,val3" , "http://localhost:8443" , defaultProps , withListParams },
4950 {"jdbc:clickhouse://localhost:8443/default?custom_header1=\" role 1,3,4\" ,'val2',val3¶m1=value1" , "http://localhost:8443" , defaultProps , withListParamsQuotes },
50-
51+ { "jdbc:clickhouse://localhost:8443/clickhouse?ssl=true" , "https://localhost:8443" , defaultProps , useDatabaseSSLParams },
5152 };
5253 }
5354
0 commit comments