@ContextConfiguration defined on a base class and a composed annotation do not merge [SPR-13670] #18245
Labels
in: test
Issues in the test module
status: bulk-closed
An outdated, unresolved issue that's closed in bulk as part of a cleaning process
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:
@ContextConfiguration
directly and as meta-annotation on the same class [SPR-15274] #19839 Ability to use@ContextConfiguration
and a meta@ContextConfiguration
on the same classThe text was updated successfully, but these errors were encountered: