Skip to content

ActiveProfilesResolver is supplied composed annotation class instead of test class [SPR-11467] #16093

Closed
@spring-projects-issues

Description

@spring-projects-issues

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

  1. Ensure that the actual test class is always passed to ActiveProfilesResolver.resolve(Class).

Affects: 4.0 GA

Issue Links:

Referenced from: commits 5f7d175

Metadata

Metadata

Assignees

Labels

in: testIssues in the test moduletype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions