spring-projects / spring-projects/spring-data-relational

Unify integration test infrastructure

Open
#1,181 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
827
Forks
394
PR merge metrics
No merged PRs in 30d

Description

Spring Data JDBC & R2DBC currently use different ways to implement integration tests.

JDBC

  • creates an ApplicationContext and 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 ApplicationContext if 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the existing Spring Data JDBC and R2DBC integration-test infrastructure described in the issue, including their database selection, SQL loading, application-context handling, and feature annotations. Define the shared test module boundary and verify that both modules can use it while preserving their database coverage and test behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.