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
In the above log output, it's clear that the listeners declared via @TestExecutionListeners on @Composed are somehow getting set to the listeners declared via @TestExecutionListeners on AbstractTestNGSpringContextTests.
In the example provided in this issue's description, @TestExecutionListeners is the inherited annotation which is currently (unintuitively) favored over @Composed which is the more locally declared composed annotation.
In other words, this is not a bug in spring-test but rather an (as of yet) unsupported feature in spring-core.
Note: the getAnnotationAttributesFavorsInheritedAnnotationsOverMoreLocallyDeclaredComposedAnnotations() method in AnnotatedElementUtilsTests already demonstrates this shortcoming.
John Bass opened SPR-12661 and commented
Status Quo
When using TestNG and deriving a test from
AbstractTestNGSpringContextTests
,@TestExecutionListeners
as a meta-annotation doesn't seem to be working.Here's a little 3-class test:
Here's some output when this is run:
Analysis
In the above log output, it's clear that the
listeners
declared via@TestExecutionListeners
on@Composed
are somehow getting set to the listeners declared via@TestExecutionListeners
onAbstractTestNGSpringContextTests
.Affects: 4.1 GA
Issue Links:
The text was updated successfully, but these errors were encountered: