-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement
Milestone
Description
Sam Brannen opened SPR-14000 and commented
Overview
TestNG has never required that @Test methods be public. Furthermore, the upcoming JUnit 5 also no longer requires that test methods be public.
The Spring TestContext Framework (TCF) should therefore also not require that test methods are public.
Analysis
The TCF in fact does not require that test methods are public, since this is the responsibility of the underlying testing framework (e.g., JUnit or TestNG); however, it is currently not possible to have a @Transactional test method be non-public. The reason is that AnnotationTransactionAttributeSource is by default configured to ignore non-public methods.
Deliverables
- Ensure that
@Transactionaltest methods are not required to bepublic
Affects: 3.2.16
Issue Links:
- Support @BeforeTransaction and AfterTransaction on non-public methods [SPR-13997] #18570 Support
@BeforeTransactionand AfterTransaction on non-public methods
Referenced from: commits df7b24b
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement