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
Ability to use @ContextConfiguration directly and as meta-annotation on the same class [SPR-15274] #19839
We have a project split up into multiple modules. Among them there are:
database module
stream module
Each of them defines a test project (database-test, stream-test)
And there is a consumer of these modules:
cqrs module
cqrs has a mandatory dependency on the database module and optional dependency on the stream module.
Therefore the AbstractCqrsIntegrationTest extends AbstractDataIntegrationTest and cannot extend an abstract stream test class.
What I wanted to do was to create this meta annotation in the stream module:
But @ContextConfiguration coming from meta annotation is ignored and replaced by the one declared directly on AbstractCqrsIntegrationTest.
I know that @ContextConfiguration are correctly merged by traversing only superclasses. But this doesn't apply to my need.
Would it be possible to fetch all declared @ContextConfiguration at the class level?
It seems it would require to add a method in MetaAnnotationUtils similar to:
changed the title [-]Ability to use @ContextConfiguration and a meta @ContextConfiguration on the same class [SPR-15274][/-][+]Ability to use `@ContextConfiguration` directly and as meta-annotation on the same class [SPR-15274][/+]on Jan 8, 2024
Activity
snicoll commentedon Sep 20, 2023
@sbrannen I can see you've assigned yourself and I am wondering if that wouldn't be a duplicate of #26142 that has been declined.
[-]Ability to use @ContextConfiguration and a meta @ContextConfiguration on the same class [SPR-15274][/-][+]Ability to use `@ContextConfiguration` directly and as meta-annotation on the same class [SPR-15274][/+]sbrannen commentedon Jan 8, 2024
@ContextConfigurationannotations on a test class #26142