Unify integration test infrastructure
Spring Data JDBC & R2DBC currently use different ways to implement integration tests.
JDBC
- creates an
ApplicationContextand uses Spring profiles to create the right kind of database. - SQL scripts are loaded from a text file which is derived from the test name and the database type.
- runs integration tests against various different databases by running them with different Spring profiles.
- has annotations to run tests based on the presence of a feature.
R2DBC
- creates no
ApplicationContextif doesn't need to for other reasons. - runs integration tests against various different databases by having subclasses for each database.
We should unify the test infrastructure and extract it into a test module which can be used by both modules.
The practical effect of this issue is that https://github.com/spring-projects/spring-data-relational?tab=readme-ov-file#building-from-source is inaccurate/broken because, without other setup, ./mvnw clean install will fail once it gets to failsafe:integration-test plugin invocation in the default-test phase of spring-data-r2dbc.
Which for me means, that I'd like to test some changes to potentially contribute but can't really make sure it doesn't break some r2dbc unit test.
@Xiphoseer I don't really see, how the described behaviour from you comment is caused by the different ways of handling integration tests for jdbc and r2dbc.
What failure are you seeing exactly? Is it complaining about a missing Docker environment? Or something else? You might consider creating a separate issue for this.