Skip to content

Comments

Add 56 JDBC spec integration tests with comprehensive DatabaseMetaData coverage#1216

Open
gopalldb wants to merge 1 commit intodatabricks:mainfrom
gopalldb:jdbc-spec-remaining-coverage
Open

Add 56 JDBC spec integration tests with comprehensive DatabaseMetaData coverage#1216
gopalldb wants to merge 1 commit intodatabricks:mainfrom
gopalldb:jdbc-spec-remaining-coverage

Conversation

@gopalldb
Copy link
Collaborator

@gopalldb gopalldb commented Feb 18, 2026

Summary

  • Adds 56 new integration tests across 5 test files to close JDBC spec coverage gaps
  • Includes comprehensive DatabaseMetaData testing following Snowflake's "mega-assertion" pattern (~180 assertions covering all boolean/int/string property methods)
  • All tests use the WireMock record-replay fake service infrastructure with both SEA and Thrift recordings

New tests by file:

File New Tests Coverage Area
MetadataIntegrationTests 25 All boolean properties, string/int properties, ResultSet-returning methods (getTypeInfo, getProcedures, getFunctions, getImportedKeys, getExportedKeys, getCrossReference, etc.), wrapper/lifecycle
ResultSetIntegrationTests 10 Type getters: getBoolean, getByte, getShort, getLong, getFloat, getDouble, getBigDecimal, getDate, getTimestamp, getObject
PreparedStatementIntegrationTests 7 Type setters: setBoolean, setLong, setFloat, setDouble, setBigDecimal, setDate, setTimestamp
ExecutionIntegrationTests 4 Statement utilities: fetchDirection, enquoteLiteral, enquoteIdentifier, isSimpleIdentifier
ConnectionIntegrationTests 3 Connection attributes: autoCommit default, isReadOnly, transactionIsolation

Verification results:

  • SEA REPLAY: All tests pass (0 failures)
  • Thrift REPLAY: All tests pass (8 metadata tests skipped as SEA-only due to Thrift recording limitations)

Test plan

  • All 56 new tests pass in SEA REPLAY mode
  • All tests pass in Thrift REPLAY mode (with expected skips)
  • No regressions in existing tests
  • WireMock recordings committed for both SEA and Thrift modes

🤖 Generated with Claude Code

NO_CHANGELOG=true

Closes coverage gaps for DatabaseMetaData, ResultSet, PreparedStatement,
Statement, and Connection interfaces using the fake service record-replay
infrastructure. Includes SEA and Thrift mode recordings.

New tests by file:
- MetadataIntegrationTests: 25 new (mega-assertion for all boolean/int/string
  properties, ResultSet-returning methods, wrapper/lifecycle)
- ResultSetIntegrationTests: 10 new (type getters: boolean, byte, short, long,
  float, double, BigDecimal, Date, Timestamp, getObject)
- PreparedStatementIntegrationTests: 7 new (type setters: boolean, long, float,
  double, BigDecimal, Date, Timestamp)
- ExecutionIntegrationTests: 4 new (fetchDirection, enquoteLiteral,
  enquoteIdentifier, isSimpleIdentifier)
- ConnectionIntegrationTests: 3 new (autoCommit, isReadOnly,
  transactionIsolation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant