Skip to content

test(conformance): select DBMetaDataTest, StatementTest, and PrepStmtTest (#163) - #164

Merged
magnusp merged 1 commit into
mainfrom
fix/i163-select-suites
Oct 23, 2026
Merged

magnusp merged 1 commit into
mainfrom
fix/i163-select-suites

Conversation

@magnusp

@magnusp magnusp commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Fixes #163

Hrana 3 is the source of truth for transport, values, metadata, batching, transactions, and error reporting. java.sql is the source of truth for the JDBC surface. xerial/sqlite-jdbc 3.53.4.0 is the behavioral reference and conformance foundation, never a copy target.

What changed

  • Select DBMetaDataTest, StatementTest, and PrepStmtTest in upstream-xerial_sqlite-jdbc.manifest; remove their rejections; add their pinned sources to the vendored tree.
  • Preserve every existing selected file and divergence. TypeMapTest stays rejected.
  • Regenerate UPSTREAM.md and record the upstream and current hashes in CHECKSUMS.sha256.
  • Record one # divergence: line for each new copy, covering only the cases Hrana or sqld cannot supply.

Red

At the base, with only the mechanical removal of xerial-only references so the copies compile without sqlite-jdbc:

./mvnw -pl libsql-conformance -am -Dit.test='DBMetaDataTest,StatementTest,PrepStmtTest' verify
Tests run: 145, Failures: 9, Errors: 6, Skipped: 3
StatementTest.executeUpdate, multipleStatements (SQL_MANY_STATEMENTS), tempTable (SQL_PARSE_ERROR),
failToDropWhenRSOpen, dateTimeTest
PrepStmtTest.noSuchTable, noSuchCol, getParameterTypeTest,
getParameterTypeTest_when_no_parameter_set, metaData, preparedStatementShouldNotThrowIfNotAllParamsSet,
gh811_getMetadata_before_execution, set, date1, date2

Green

At head 55fc0b34851385a994c2660db1d07f40204ea7d8:

./mvnw -pl libsql-conformance -am -Dit.test='DBMetaDataTest,StatementTest,PrepStmtTest' verify
Tests run: 145, Failures: 0, Errors: 0, Skipped: 6

./mvnw -pl libsql-conformance -am -Pxerial-control -Dit.test='DBMetaDataTest,StatementTest,PrepStmtTest' verify
Tests run: 145, Failures: 0, Errors: 0, Skipped: 1

./mvnw -pl libsql-conformance -am verify
Tests run: 268, Failures: 0, Errors: 0, Skipped: 7

./mvnw -pl libsql-conformance -am -Pxerial-control verify
Tests run: 245, Failures: 0, Errors: 0, Skipped: 2

tools/export-upstream --verify            verified
tools/export-upstream --verify-pinned     verified against cab7981c19ce04d691f0675f0b2586afc2bbf803
./mvnw spotless:check                     BUILD SUCCESS
./mvnw test                               BUILD SUCCESS (336 JDBC tests)
./mvnw -pl libsql-jdbc -am package -DskipTests  BUILD SUCCESS

Logs are in /tmp/xerial-parity-i163/.

Divergences

  • DBMetaDataTest: sqld rejects CREATE TEMP TABLE with SQL_PARSE_ERROR, so columnOrderOfgetTables is skipped on libSQL and left intact for the xerial control run.
  • StatementTest: Hrana sends one statement per Stmt, so sqld rejects multi-statement strings with SQL_MANY_STATEMENTS; sqld rejects TEMP tables; and independent Hrana streams let DROP succeed while a materialized result set is open. Those cases are skipped or asserted per driver. The DATE-millis round trip compares the calendar date on libSQL, and standard JDBC unwrap/closeOnCompletion calls replace the sqlite-jdbc-only class references.
  • PrepStmtTest: Hrana has no describe request, so parameter types, pre-execution metadata, and pre-execution SQL validation assert the libSQL contract or skip; the reused result set is reassigned after the next execute as java.sql requires; DATE-millis compares the calendar date; the four cases that call sqlite-jdbc's own configuration and error-code classes are dropped.

…Test (#163)

Fixes #163

Hrana 3 remains the source of truth for transport, values, metadata, batching, transactions, and error reporting. java.sql defines the JDBC surface. xerial/sqlite-jdbc 3.53.4.0 is the behavioral reference and conformance foundation, never a copy target.

Select the three classes at the pinned 3.53.4.0 commit, preserve every existing selected file and divergence, and record one divergence per new copy for the sqld and no-describe cases.
@magnusp
magnusp merged commit f4e0d96 into main Oct 23, 2026
6 checks passed
@magnusp
magnusp deleted the fix/i163-select-suites branch October 23, 2026 03:51
@magnusp magnusp mentioned this pull request Oct 23, 2026
27 of 28 tasks
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.

Select DBMetaDataTest, StatementTest, and PrepStmtTest in the conformance suite

1 participant