Importing Tests for New Hibernate Dialect?

Hi, our team is interested in writing a new Hibernate Dialect for Google Spanner (Github here.)

I see that the Hibernate-ORM Github repo has a large set of tests to test the various Hibernate dialects. We are interested in leveraging these tests too. Is there a way for us to incorporate running those tests in our repo without duplicating those tests in our repo too? (i.e. Is this possible via some kind of advanced Gradle setup?)

Why not fork the project and add your tests in the Hibernate ORM? That’s what is needed to integrate a certain Dialect.

Thanks for the response. So we will keep a separate repo and use a fork of hibernate-orm to be able to run the tests; does that make sense?

Also, we have one more question: What is your recommendation for the best way to test the dialect as we develop it?

We want to try to generate SQL strings with our dialect - is this possible to do with calls made to some Hibernate library code? I.e. Is there some libraries in Hibernate that we can use to specify entity classes and generate SQL strings for a unit test? This approach being faster than using it in a full-blown integration tests with a real database.

Thanks for your time.

The best way to test the Dialect is to run the Hibernate integration tests like this:

> gradlew clean test -Pdb=spanner

Where spanner is an entry in databases.gradle.

Hibernate relies more on integration tests than unit tests, so you need a live DB to test it properly.