You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ActiveProfilesResolver is supplied composed annotation class instead of test class [SPR-11467] #16093
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).
Prior to this commit, if @ActiveProfiles were used as a meta-annotation
on a composed annotation, then the composed annotation's class would be
passed to the ActiveProfilesResolver.resolve() method instead of the
test class, which breaks the contract for ActiveProfilesResolver.
This commit addresses this issue by ensuring that the actual test class
is always passed to ActiveProfilesResolver.resolve().
Activity
spring-projects-issues commentedon Feb 22, 2014
Sam Brannen commented
Fixed as described in the comments for GitHub commit 5f7d175: