spring-projects / spring-projects/spring-framework

Introduce `@Transactional` support for R2DBC in the TestContext framework

Open
#24,226 19 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: data in: test type: enhancement
Dominant language
Java
Stars
60.2k
Forks
38.8k
Avg merge
5d 2h
Merged PRs (30d)
27

Description

Since we have @Transactional working with R2DBC repositories in 1.0 M2 (as said here), I would like to ask if there is a way to make @Transactional working with JUnit (integration) tests (the same way we are able to do when using JDBC repositories). Is this currently possible? Will this even be possible? What is the right approach to achieve transactional tests ?

Currently, running a @Transactional @SpringBootTest gives me java.lang.IllegalStateException: Failed to retrieve PlatformTransactionManager for @Transactional test (the same problem as this guy has: http://disq.us/p/2425ot1).

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

The issue names the TestContext framework and the @Transactional @SpringBootTest path; start by tracing the reported PlatformTransactionManager lookup failure. Compare that path with existing JDBC transactional-test behavior. Done means R2DBC-backed integration tests can use @Transactional without the reported exception.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.