Closed
Description
Sam Brannen opened SPR-11467 and commented
Status Quo
The Javadoc for ActiveProfilesResolver.resolve(Class)
states the following:
Resolve the bean definition profiles to use when loading an
ApplicationContext
for the given test class.Parameters:
testClass
the test class for which the profiles should be resolved; never null
This contract was honored for the initial support of ActiveProfilesResolver
; however, with the added support for using test-related annotations as meta-annotations, if @ActiveProfiles
is used as a meta-annotation on a custom composed annotation, then the composed annotation is passed to the resolve()
method instead of the test class.
Deliverables
- Ensure that the actual test class is always passed to
ActiveProfilesResolver.resolve(Class)
.
Affects: 4.0 GA
Issue Links:
- ContextLoader is supplied composed annotation class instead of test class for default resource detection [SPR-11455] #16081 ContextLoader is supplied composed annotation class instead of test class for default resource detection
Referenced from: commits 5f7d175