Skip to content

Lazily register DynamicValuesPropertySource in the TestContext framework #32871

@sbrannen

Description

@sbrannen

Overview

As a result of commit 6cdb344, the DynamicValuesPropertySource is now eagerly registered in the Environment even if the DynamicPropertyRegistry is never used to register dynamic properties.

Ideally, we should only register DynamicValuesPropertySource if we know that the DynamicPropertyRegistry is used -- either by a @DynamicPropertySource method in a test class or via a bean in the ApplicationContext that invokes add() on the DynamicPropertyRegistry bean.

Related Issues

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions