Skip to content

Allow non-public @Transactional test methods [SPR-14000] #18573

@spring-projects-issues

Description

@spring-projects-issues

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

  1. Ensure that @Transactional test methods are not required to be public

Affects: 3.2.16

Issue Links:

Referenced from: commits df7b24b

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions