Skip to content

spring.profiles.active is not honored when building the context cache key in the TestContext framework [SPR-11135] #15761

Closed
@spring-projects-issues

Description

@spring-projects-issues

Jeroen Benckhuijsen opened SPR-11135 and commented

Status Quo

The Spring TestContext Framework has a mechanism for caching loaded application contexts. This cache mechanism works by inspecting a number of attributes of the @ContextConfiguration, @WebAppConfiguration, and @ActiveProfiles annotations.

Claim

The aforementioned caching mechanism does not honor the spring.profiles.active system property in case it is set, although the started application context does.

In case two or more tests are run with different @ActiveProfiles configurations, the application contexts loaded for those tests are viewed as distinct application contexts, although the resulting contexts are equal, making the caching mechanism ineffective.


Affects: 3.2.5

Attachments:

Issue Links:

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulestatus: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions