spring-projects / spring-projects/spring-framework
Extend default script detection in `@Sql` to account for execution phase [SPR-13322]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 60.2k
- Forks
- 38.8k
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 27
Description
Robert Thaler opened SPR-13322 and commented
Status Quo
We often need to prepare data before a specific test and clean up this data after the test. Therefore we use two distinct scripts assigned to the test's ExecutionPhase.
Proposal
Appending a suffix such as _before or _after to the default script name would allow one to use default detection with different scripts for preparation and cleanup.
Deliverables
- Default script detection should take the
ExecutionPhaseinto account.
Affects: 4.1 GA
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the @Sql default script detection and its handling of ExecutionPhase. Review the related Spring testing code and existing tests, then verify that preparation and cleanup phases can resolve distinct default scripts using the proposed suffixes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100