Skip to content

@DynamicPropertySource is not supported via @NestedTestConfiguration semantics #26091

@fbiville

Description

@fbiville

Reproduced with Spring Framework 5.3.1 (via Spring Boot 2.4.0).

As initially described here and here, nested tests do not work with @DynamicPropertySource.

You can reproduce the issue with this sample Spring Data JPA (2.4.1) repository: https://github.com/fbiville/spring-data-jpa-nested (see README for reproduction one-liners).

As suggested by @wilkinsona here, replacing the annotation with ApplicationContextInitializer works.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions