Repository navigation
test(jdbc): add Hibernate integration smoke tests - #264
Merged
Merged
Conversation
# Conflicts: # libsql-jdbc/pom.xml # pom.xml
# Conflicts: # libsql-jdbc/pom.xml # pom.xml
# Conflicts: # libsql-jdbc/pom.xml # pom.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Promotes the Hibernate smoke prototype into
libsql-jdbcas a Failsafe integration test.HibernateITdrives the in-tree driver through Hibernate ORM 7.4: identity-generated keys, scalar mapping,@ManyToOneassociations, HQL joins and pagination, repeated inserts, schema validation, and optimistic locking.HibernateSqldSupportstarts the pinned sqld Testcontainer and creates the schema through JDBC. Hibernate 7.4's SQLite dialect emits an untyped identity column forbook, so its own DDL is not used; the validator test still reads the schema back through the driver'sDatabaseMetaData.OPTIMISTIC_FORCE_INCREMENT;@Versionround-trip and stale merge.0, throws an optimistic-lock exception, and leaves the stored row unchanged.*ITwiring../mvnw teststays unit-only.target/docker-configand setsDOCKER_CONFIGfor Failsafe, so sandboxed runs work without a shell override.Driver findings
No driver-level defects surfaced in the covered Hibernate paths. Generated keys, versioned update/delete counts, timestamp comparisons, and schema validation all behaved correctly.
Auto-commit identity
#83already tracks the relevant limitation: in auto-commit, a directSELECT last_insert_rowid()reads a fresh Hrana stream. Hibernate'sGenerationType.IDENTITYuses that same query, so this suite keeps auto-commit disabled (Hibernate's default) and documents the dependency. No duplicate issue was created.Refs #83
Test plan
./mvnw -pl libsql-jdbc -am -Dit.test=HibernateIT -Dtest=NoSuchTest -Dsurefire.failIfNoSpecifiedTests=false verify— 11 tests pass./mvnw spotless:check./prototype/hibernate-smoke/run.sh— 11 prototype tests pass against a throwaway sqld container