spring-projects / spring-projects/spring-boot

Consider automatically applying @DirtiesContext to Testcontainer tests

Open
#38,237 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: pending-design-work type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

See #38176 for an example of a problem caused by a mismatch of the test containers and spring lifecycle. It would be nice if we could prevent users from hitting the same problem.

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

Start by reading issue #38176 and tracing how the affected Testcontainers tests interact with the Spring lifecycle. Then locate the existing test-context and Testcontainers integration points and determine where automatic @DirtiesContext behavior would belong. Done means the lifecycle mismatch is prevented without requiring users to add the annotation manually, with coverage for the reported scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.