Skip to content

Conversation

@rayudu3745
Copy link
Contributor

@rayudu3745 rayudu3745 commented Dec 11, 2025

This change introduces the initial setup required to execute Hibernate Spanner Dialect tests against the Cloud Spanner Emulator:
https://github.com/GoogleCloudPlatform/cloud-spanner-emulator

With this configuration in place, Spanner Dialect tests can now be executed locally by running:

./docker_db.sh spanner

./gradlew test -Pdb=spanner

At present, the test suite will not pass. There are multiple known gaps and incompatibilities in the current SpannerDialect implementation that prevent full test coverage from succeeding. These issues are expected and will be addressed incrementally in upcoming PRs, which will deliver fixes, behavioral corrections, and broader functional improvements.

This PR focuses solely on enabling the emulator-backed test environment so that future development and validation can occur consistently and locally.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-19983

@sebersole
Copy link
Member

@beikov As the docker / container expert, wdyt?

@beikov
Copy link
Member

beikov commented Dec 12, 2025

This looks good already, but I wonder if we can enable parallelization as well, as I assume that the emulator will be "slower" probably?
Since databases are automatically created (apparently?), it might be as simple as changing the JDBC URL to jdbc:cloudspanner:/projects/orm-test-project/instances/orm-test-instance/databases/orm-test-db-$worker?autoConfigEmulator=true;lenient=true and adding the name of the database bundle to the if checks in hibernate-core.gradle and hibernate-envers.gradle. Search for GradleParallelTestingResolver in those files and you will find the place.

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.

3 participants