-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Inheritance support for conditional annotations #4147
Comments
Thinking out loud here, I think we have at least the following options:
Both (1) and (3) would be breaking changes. For (2), I think we could generate the Any other ideas? |
To avoid the breaking change, can this be combined with a new opt-in flag for the current annotations, |
Team decision: Wait for additional interest from the community. |
+1 upvote I recently faced a similar use case with the The approach suggested by @scordio looks great to me. @marcphilipp @scordio, if you don't mind, I’d be happy to submit a PR if you decide to implement this. |
That would certainly be an option, and it's similar to what I did for several test-related annotations in the Spring Framework (for example, However, there's a difference: all of those If we introduce I'm simply "playing devil's advocate" here to ensure we think about multiple use cases. |
@vdmitrienko, in case you meant to up-vote this feature request, we use the 👍 emoji "reaction" on the issue description to track that. |
Thanks @sbrannen ! |
@sbrannen, this brings me to the following thoughts: Perhaps, from a maintenance standpoint, using |
I faced a use case where inheritance for
@EnabledIfSystemProperty
would have helped for less boilerplate.Specifically, it's a project with many test classes for integration tests that should be executed only on the CI infrastructure and specific runners. Such fine-grained control is currently achieved combining the
maven-failsafe-plugin
to exclude the local environment and@EnabledIfSystemProperty(named = "it.test", matches = ".+")
on each test class to ensure that they are executed only under the appropriate CI jobs (theit.test
property is set to different values by each CI job to tune the failsafe plugin execution further).As the test classes already share common parts in a parent class, pulling
@EnabledIfSystemProperty
to the parent class would help reduce the boilerplate.Relates to #3462 (comment).
Deliverables
The text was updated successfully, but these errors were encountered: