@@ -109,7 +109,7 @@ public void acceptsURL(String url, boolean accept, String connectionString) thro
109109 @ SuppressWarnings ("UnstableApiUsage" )
110110 @ Test
111111 public void getPropertyInfoDefault () throws SQLException {
112- String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/pr/testing/ci " ;
112+ String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/db " ;
113113
114114 Properties properties = new Properties ();
115115 DriverPropertyInfo [] propertyInfo = driver .getPropertyInfo (url , properties );
@@ -122,13 +122,13 @@ public void getPropertyInfoDefault() throws SQLException {
122122 Assertions .assertEquals (expect , actual );
123123
124124 YdbProperties ydbProperties = YdbJdbcTools .from (url , properties );
125- Assertions .assertEquals ("grpc://ydb-demo.testhost.org:2135/test/pr/testing/ci " ,
125+ Assertions .assertEquals ("grpc://ydb-demo.testhost.org:2135/test/db " ,
126126 ydbProperties .getConnectionProperties ().getConnectionString ());
127127 }
128128
129129 @ Test
130130 public void getPropertyInfoAllFromUrl () throws SQLException {
131- String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/pr/testing/ci ?" +
131+ String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/db ?" +
132132 customizedProperties ().entrySet ().stream ()
133133 .map (e -> e .getKey () + "=" + e .getValue ())
134134 .collect (Collectors .joining ("&" ));
@@ -141,15 +141,18 @@ public void getPropertyInfoAllFromUrl() throws SQLException {
141141 actual .forEach (logger ::info );
142142
143143 List <String > expect = convertPropertyInfo (customizedPropertyInfo ());
144- Assertions .assertEquals (expect , actual );
144+ Assertions .assertEquals (expect .size (), actual .size (), "Wrong size of all properties" );
145+ for (int idx = 0 ; idx < expect .size (); idx += 1 ) {
146+ Assertions .assertEquals (expect .get (idx ), actual .get (idx ), "Wrong parameter " + idx );
147+ }
145148
146149 YdbProperties ydbProperties = YdbJdbcTools .from (url , properties );
147150 checkCustomizedProperties (ydbProperties );
148151 }
149152
150153 @ Test
151154 public void getPropertyInfoFromProperties () throws SQLException {
152- String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/pr/testing/ci " ;
155+ String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/db " ;
153156
154157 Properties properties = customizedProperties ();
155158 Properties copy = new Properties ();
@@ -162,7 +165,10 @@ public void getPropertyInfoFromProperties() throws SQLException {
162165 actual .forEach (logger ::info );
163166
164167 List <String > expect = convertPropertyInfo (customizedPropertyInfo ());
165- Assertions .assertEquals (expect , actual );
168+ Assertions .assertEquals (expect .size (), actual .size (), "Wrong size of all properties" );
169+ for (int idx = 0 ; idx < expect .size (); idx += 1 ) {
170+ Assertions .assertEquals (expect .get (idx ), actual .get (idx ), "Wrong parameter " + idx );
171+ }
166172
167173 YdbProperties ydbProperties = YdbJdbcTools .from (url , properties );
168174 checkCustomizedProperties (ydbProperties );
@@ -186,7 +192,10 @@ public void getPropertyInfoOverwrite() throws SQLException {
186192
187193 // URL will always overwrite properties
188194 List <String > expect = convertPropertyInfo (defaultPropertyInfo ("sas" ));
189- Assertions .assertEquals (expect , actual );
195+ Assertions .assertEquals (expect .size (), actual .size (), "Wrong size of default properties" );
196+ for (int idx = 0 ; idx < expect .size (); idx += 1 ) {
197+ Assertions .assertEquals (expect .get (idx ), actual .get (idx ), "Wrong default parameter " + idx );
198+ }
190199
191200 YdbProperties ydbProperties = YdbJdbcTools .from (url , properties );
192201 Assertions .assertEquals ("grpc://ydb-demo.testhost.org:2135/testing/ydb" ,
@@ -200,7 +209,7 @@ public void getTokenAs(String token, String expectValue) throws SQLException {
200209 token += TOKEN_FILE .getAbsolutePath ();
201210 }
202211
203- String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/pr/testing/ci ?token=" + token ;
212+ String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/db ?token=" + token ;
204213 Properties properties = new Properties ();
205214 YdbProperties ydbProperties = YdbJdbcTools .from (url , properties );
206215
@@ -212,7 +221,7 @@ public void getTokenAs(String token, String expectValue) throws SQLException {
212221 @ ParameterizedTest
213222 @ MethodSource ("unknownFiles" )
214223 public void getTokenAsInvalid (String token , String expectException ) {
215- String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/pr/testing/ci ?token=" + token ;
224+ String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/db ?token=" + token ;
216225 ExceptionAssert .ydbConfiguration (expectException , () -> YdbJdbcTools .from (url , new Properties ()));
217226 }
218227
@@ -222,7 +231,7 @@ public void getCaCertificateAs(String certificate, String expectValue) throws SQ
222231 if ("file:" .equals (certificate )) {
223232 certificate += CERTIFICATE_FILE .getAbsolutePath ();
224233 }
225- String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/pr/testing/ci " +
234+ String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/db " +
226235 "?secureConnectionCertificate=" + certificate ;
227236 Properties properties = new Properties ();
228237 YdbProperties ydbProperties = YdbJdbcTools .from (url , properties );
@@ -235,15 +244,15 @@ public void getCaCertificateAs(String certificate, String expectValue) throws SQ
235244 @ ParameterizedTest
236245 @ MethodSource ("unknownFiles" )
237246 public void getCaCertificateAsInvalid (String certificate , String expectException ) {
238- String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/pr/testing/ci " +
247+ String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/db " +
239248 "?secureConnectionCertificate=" + certificate ;
240249 ExceptionAssert .ydbConfiguration (expectException , () -> YdbJdbcTools .from (url , new Properties ()));
241250 }
242251
243252 @ ParameterizedTest
244253 @ MethodSource ("invalidDurationParams" )
245254 public void invalidDuration (String param ) {
246- String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/pr/testing/ci ?" + param + "=1bc" ;
255+ String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/db ?" + param + "=1bc" ;
247256 ExceptionAssert .ydbConfiguration ("Unable to convert property " + param +
248257 ": Unable to parse value [1bc] -> [PT1BC] as Duration: Text cannot be parsed to a Duration" ,
249258 () -> YdbJdbcTools .from (url , new Properties ()));
@@ -252,7 +261,7 @@ public void invalidDuration(String param) {
252261 @ ParameterizedTest
253262 @ MethodSource ("invalidIntegerParams" )
254263 public void invalidInteger (String param ) {
255- String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/pr/testing/ci ?" + param + "=1bc" ;
264+ String url = "jdbc:ydb:ydb-demo.testhost.org:2135/test/db ?" + param + "=1bc" ;
256265 ExceptionAssert .ydbConfiguration ("Unable to convert property " + param +
257266 ": Unable to parse value [1bc] as Integer: For input string: \" 1bc\" " ,
258267 () -> YdbJdbcTools .from (url , new Properties ()));
@@ -313,14 +322,17 @@ static DriverPropertyInfo[] defaultPropertyInfo(@Nullable String localDatacenter
313322 YdbOperationProperty .AUTOCOMMIT .toDriverPropertyInfo ("true" ),
314323 YdbOperationProperty .TRANSACTION_LEVEL .toDriverPropertyInfo ("8" ),
315324
316- YdbOperationProperty .ENFORCE_SQL_V1 .toDriverPropertyInfo ("true" ),
317- YdbOperationProperty .ENFORCE_VARIABLE_PREFIX .toDriverPropertyInfo ("true" ),
318325 YdbOperationProperty .CACHE_CONNECTIONS_IN_DRIVER .toDriverPropertyInfo ("true" ),
319- YdbOperationProperty .DETECT_SQL_OPERATIONS .toDriverPropertyInfo ("true" ),
320326
327+ YdbOperationProperty .ENFORCE_SQL_V1 .toDriverPropertyInfo ("false" ),
328+
329+ YdbOperationProperty .DISABLE_DETECT_SQL_OPERATIONS .toDriverPropertyInfo ("false" ),
321330 YdbOperationProperty .DISABLE_PREPARE_DATAQUERY .toDriverPropertyInfo ("false" ),
322331 YdbOperationProperty .DISABLE_AUTO_PREPARED_BATCHES .toDriverPropertyInfo ("false" ),
323- YdbOperationProperty .DISABLE_JDBC_PARAMETERS .toDriverPropertyInfo ("false" )
332+ YdbOperationProperty .DISABLE_JDBC_PARAMETERS .toDriverPropertyInfo ("false" ),
333+ YdbOperationProperty .DISABLE_JDBC_PARAMETERS_DECLARE .toDriverPropertyInfo ("false" ),
334+
335+ YdbOperationProperty .JDBC_SUPPORT_LEVEL .toDriverPropertyInfo ("" + YdbConst .DEFAULT_JDBC_SUPPORT_LEVEL )
324336 };
325337 }
326338
@@ -350,14 +362,15 @@ static Properties customizedProperties() {
350362 properties .setProperty ("autoCommit" , "true" );
351363 properties .setProperty ("transactionLevel" , "4" );
352364
353- properties .setProperty ("enforceSqlV1" , "false" );
354- properties .setProperty ("enforceVariablePrefix" , "false" );
355365 properties .setProperty ("cacheConnectionsInDriver" , "false" );
356- properties .setProperty ("detectSqlOperations" , "false" );
357366
358- properties .setProperty ("disableAutoPreparedBatches " , "true" );
367+ properties .setProperty ("enforceSqlV1 " , "true" );
359368 properties .setProperty ("disablePrepareDataQuery" , "true" );
369+ properties .setProperty ("disableAutoPreparedBatches" , "true" );
370+ properties .setProperty ("disableDetectSqlOperations" , "true" );
360371 properties .setProperty ("disableJdbcParameters" , "true" );
372+ properties .setProperty ("disableJdbcParameterDeclare" , "true" );
373+ properties .setProperty ("jdbcSupportLevel" , "0" );
361374 return properties ;
362375 }
363376
@@ -386,19 +399,22 @@ static DriverPropertyInfo[] customizedPropertyInfo() {
386399 YdbOperationProperty .AUTOCOMMIT .toDriverPropertyInfo ("true" ),
387400 YdbOperationProperty .TRANSACTION_LEVEL .toDriverPropertyInfo ("4" ),
388401
389- YdbOperationProperty .ENFORCE_SQL_V1 .toDriverPropertyInfo ("false" ),
390- YdbOperationProperty .ENFORCE_VARIABLE_PREFIX .toDriverPropertyInfo ("false" ),
391402 YdbOperationProperty .CACHE_CONNECTIONS_IN_DRIVER .toDriverPropertyInfo ("false" ),
392- YdbOperationProperty .DETECT_SQL_OPERATIONS .toDriverPropertyInfo ("false" ),
403+
404+ YdbOperationProperty .ENFORCE_SQL_V1 .toDriverPropertyInfo ("true" ),
405+ YdbOperationProperty .DISABLE_DETECT_SQL_OPERATIONS .toDriverPropertyInfo ("true" ),
393406 YdbOperationProperty .DISABLE_PREPARE_DATAQUERY .toDriverPropertyInfo ("true" ),
394407 YdbOperationProperty .DISABLE_AUTO_PREPARED_BATCHES .toDriverPropertyInfo ("true" ),
395- YdbOperationProperty .DISABLE_JDBC_PARAMETERS .toDriverPropertyInfo ("true" )
408+ YdbOperationProperty .DISABLE_JDBC_PARAMETERS .toDriverPropertyInfo ("true" ),
409+ YdbOperationProperty .DISABLE_JDBC_PARAMETERS_DECLARE .toDriverPropertyInfo ("true" ),
410+
411+ YdbOperationProperty .JDBC_SUPPORT_LEVEL .toDriverPropertyInfo ("0" )
396412 };
397413 }
398414
399415 static void checkCustomizedProperties (YdbProperties properties ) {
400416 YdbConnectionProperties conn = properties .getConnectionProperties ();
401- Assertions .assertEquals ("grpc://ydb-demo.testhost.org:2135/test/pr/testing/ci " ,
417+ Assertions .assertEquals ("grpc://ydb-demo.testhost.org:2135/test/db " ,
402418 conn .getConnectionString ());
403419
404420 YdbOperationProperties ops = properties .getOperationProperties ();
@@ -409,14 +425,8 @@ static void checkCustomizedProperties(YdbProperties properties) {
409425 Assertions .assertEquals (Duration .ofSeconds (6 ), ops .getSessionTimeout ());
410426 Assertions .assertTrue (ops .isAutoCommit ());
411427 Assertions .assertEquals (YdbConst .ONLINE_CONSISTENT_READ_ONLY , ops .getTransactionLevel ());
412- Assertions .assertFalse (ops .isEnforceSqlV1 ());
413- Assertions .assertFalse (ops .isEnforceVariablePrefix ());
414428 Assertions .assertFalse (ops .isCacheConnectionsInDriver ());
415- Assertions .assertFalse (ops .isDetectSqlOperations ());
416-
417- Assertions .assertTrue (ops .isAutoPreparedBatchesDisabled ());
418- Assertions .assertTrue (ops .isPrepareDataQueryDisabled ());
419- Assertions .assertTrue (ops .isJdbcParametersSupportDisabled ());
429+ Assertions .assertEquals (0 , ops .getJdbcSupportLevel ());
420430 }
421431
422432 static String asString (DriverPropertyInfo info ) {
@@ -450,18 +460,18 @@ public static Collection<Arguments> urlsToCheck() {
450460 true , "grpc://ydb-demo.testhost.org:2135" ),
451461 Arguments .of ("jdbc:ydb:ydb-demo.testhost.org" ,
452462 true , "grpc://ydb-demo.testhost.org" ),
453- Arguments .of ("jdbc:ydb:ydb-demo.testhost.org:2135?database=test/pr/testing/ci " ,
454- true , "grpc://ydb-demo.testhost.org:2135/test/pr/testing/ci " ),
463+ Arguments .of ("jdbc:ydb:ydb-demo.testhost.org:2135?database=test/db " ,
464+ true , "grpc://ydb-demo.testhost.org:2135/test/db " ),
455465 Arguments .of ("jdbc:ydb:grpcs://ydb-demo.testhost.org" ,
456466 true , "grpcs://ydb-demo.testhost.org" ),
457- Arguments .of ("jdbc:ydb:ydb-demo.testhost.org:2170?database=/test/pr/testing/ci " ,
458- true , "grpc://ydb-demo.testhost.org:2170/test/pr/testing/ci " ),
459- Arguments .of ("jdbc:ydb:ydb-demo.testhost.org:2133/test/pr/testing/ci " ,
460- true , "grpc://ydb-demo.testhost.org:2133/test/pr/testing/ci " ),
461- Arguments .of ("jdbc:ydb:grpcs://ydb-demo.testhost.org?database=test/pr/testing/ci &dc=man" ,
462- true , "grpcs://ydb-demo.testhost.org/test/pr/testing/ci " ),
463- Arguments .of ("jdbc:ydb:ydb-demo.testhost.org:2135/test/pr/testing/ci ?dc=man" ,
464- true , "grpc://ydb-demo.testhost.org:2135/test/pr/testing/ci " ),
467+ Arguments .of ("jdbc:ydb:ydb-demo.testhost.org:2170?database=/test/db " ,
468+ true , "grpc://ydb-demo.testhost.org:2170/test/db " ),
469+ Arguments .of ("jdbc:ydb:ydb-demo.testhost.org:2133/test/db " ,
470+ true , "grpc://ydb-demo.testhost.org:2133/test/db " ),
471+ Arguments .of ("jdbc:ydb:grpcs://ydb-demo.testhost.org?database=test/db &dc=man" ,
472+ true , "grpcs://ydb-demo.testhost.org/test/db " ),
473+ Arguments .of ("jdbc:ydb:ydb-demo.testhost.org:2135/test/db ?dc=man" ,
474+ true , "grpc://ydb-demo.testhost.org:2135/test/db " ),
465475 Arguments .of ("ydb:" ,
466476 false , null ),
467477 Arguments .of ("jdbc:ydb" ,
0 commit comments