Skip to content

@ContextConfiguration defined on a base class and a composed annotation do not merge [SPR-13670] #18245

Closed
@spring-projects-issues

Description

@spring-projects-issues

Alain Sahli opened SPR-13670 and commented

When a test has multiple @ContextConfiguration annotations defined on a base class and a composed annotation then the one defined on the composed annotation is ignored.

I created a small example that illustrates the issue (see reference URL). In this case the TestAppContext defined on the ComposedAnnotation is ignored and therefore the ComposedAnnotationTest fails because the needed bean does not exist.

If the test class is directly annotated with @ContextConfiguration instead of using the ComposedAnnotation it works (see WorkingTest).


Affects: 4.1.7

Reference URL: https://gist.github.com/alainsahli/a3d8fd26adc527aa422c

Issue Links:

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulestatus: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning process

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions