-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Relax explicit TestContextBootstrapper resolution [SPR-17006] #21544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sam Brannen commented Regarding proposal #1, that appears to already be the case. |
Sam Brannen commented This is related to #17203. |
Sam Brannen commented FYI: I added a "directly present annotation overrides meta-present annotations" deliverable based on discussions in Moduliths Issue #5. |
Sam Brannen commented This has been addressed in commit d20d95b as follows:
|
Sam Brannen commented Oliver Drotbohm, I figured you'd like to know this has been addressed for Spring 5.1. |
Oliver Drotbohm commented Thanks for the heads up, Sam Brannen. Looks useful to me :). |
Sam Brannen commented You're welcome, Oliver Drotbohm! Phil Webb, you may also find this useful to know since you originally requested the previous behavior. |
Sam Brannen opened SPR-17006 and commented
Status Quo
The resolution process for explicit
TestContextBootstrapper
registration via@BootstrapWith
currently throws anIllegalStateException
if more than one declaration of@BootstrapWith
is detected.As mentioned in Moduliths Issue #5, the resolution can be relaxed by checking the concrete types registered via
@BootstrapWith
.Proposals
@BootstrapWith
declarations are detected but each register the exact same type of boostrapper, no exception should occur.@BootstrapWith
declarations are detected and all types registered exist within the same class hierarchy, no exception should occur, and the most specific type should be used.IllegalStateException
.@BootstrapWith
is declared locally, directly on a test class, that declaration should override any such declarations that are meta-present.Deliverables
Affects: 4.3.10
Reference URL: moduliths/moduliths#5
Issue Links:
@BootstrapWith
annotations are used on the same testThe text was updated successfully, but these errors were encountered: