Ran
|
Files
114
|
Run time
3s
|
Badge
Embed ▾
README BADGES
|
push
github
Support for testing DatabaseMetaData API in JDBC tests (#2433) JDBC specification includes introspection API contained in [DatabaseMetaData](https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/DatabaseMetaData.html) class. These methods are widely used by Java applications like DB browser, visualization and BI tools. From the point of view of client apps, correctness of implementation of these methods is guaranteed by JDBC lib vendor (DB vendor in most cases) and it is more reliable to use these methods instead of trying to do introspection with `INFORMATION_SCHEMA` or DB-specific SQL. The implementation of some of these methods is done by calling system stored procedures like `sp_tables` or `sp_columns`. While these procedures in Babelfish are already covered with direct SQL tests, it is suggested to add additional test coverage by running these Java methods as part of JDBC test suite. These methods call system procedures with a particular set of arguments (partially hardcoded in implementation lib). And, in theory, these calls and arguments can be different in newer versions of implementation lib. Currently test harness uses [very old version of mssql-jdbc lib](https://github.com/babelfish-for-postgresql/babelfish_extensions/blob/b38e6e2c0/test/JDBC/pom.xml#L51). Its update is not trivial, because error output differs in different versions (thus a large number of output files need to be updated as well). But when the time will come to update the version (or to run JDBC tests with multiple versions) it may be beneficial to have `DatabaseMetaData` API coverage in place. Besides that, the alternative JDBC implementation in jTDS lib also implements the subset of `DatabaseMetaData` API, proposed new tests can run on jTDS as well. Signed-off-by: Alex Kasko <alex@staticlibs.net>
41136 of 56693 relevant lines covered (72.56%)
58509.24 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|