Closed
Description
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:
- pom.xml (2.99 kB)
- spr11135.zip (7.20 kB)
Issue Links:
- Allow overriding
@ActiveProfiles
in test classes with system property [SPR-8982] #13622 Allow overriding@ActiveProfiles
in test classes with system property