Skip to content

Pin unpinned JDBC behaviors before the refactor passes #195

Closed

Description

@magnusp

Goal

Pin the four behaviors that the refactor passes touch but the suite does not currently check. A pin is a test that fails when the behavior changes. A test that cannot fail is not a pin.

This issue ships tests only. No production code changes.

Why

The suite is broad. ./mvnw -pl libsql-jdbc -am test runs 374 tests, and the xerial conformance suite adds 272. Four areas have no direct coverage, and three later passes move code in them.

Scope

  • Attached-schema table metadata. Drive ATTACH then metadata lookups through LibsqlResultSetMetaData. Cover loadAttachedTableInfo and findSchema (LibsqlResultSetMetaData 468 to 501).
  • Date and time tails. Cover a text value with an offset suffix, one with a Z suffix, a bare time value defaulting to 2000-01-01, and BLOB rejection with the "Bad value for type X" message (LibsqlResultSet 1156 to 1276).
  • Savepoint edge cases. Cover two savepoints with the same name resolved by lastIndexOf, and releasing the outermost savepoint of a transaction started in auto-commit (LibsqlConnection 532 to 658).
  • Concurrency edges. Cover batch execution racing close(). The socketTimeout URL case belongs to socketTimeout alone in a JDBC URL throws NumberFormatException #196 and is not part of this pass.

Mutation probe

For each new test, break the quirk in a scratch build and show the test fails. Revert the break. Record the command and the failure line in the PR body. A new test that stays green under the break is rewritten.

Acceptance

  • The four areas above have characterization tests that fail against a deliberate perturbation.
  • ./mvnw -pl libsql-jdbc -am test green, with no production file touched except a temporary reverted mutation.
  • ./mvnw spotless:check green.
  • The PR body lists each probe command and its observed failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions