-
-
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
Allow extensions to leverage registered ParameterResolvers for method and constructor invocations #2393
Comments
Tentatively slated for 5.8 for team discussion |
I thought we already had an open issue for that, but I can't seem to find it now. In any case, this is related to:
|
Any word on this? I looked at the "related issues", though to my noob eyes I was not really seeing the relationship aside from them also asking about ParameterResolvers
|
Tentatively slated for 5.8 M1 solely for the purpose of team discussion. |
Team brainstorming One option would be to introduce a method directly on An intermediate interface, e.g. |
Team decision: Introduce |
I just updated to 5.8.0.M1 and there is neither a method Did I misunderstand the associated milestones here? |
So any idea when 5.9 will be released now? |
@sebersole This change has not yet been made. Would you be interested and have time to work on it? |
@juliette-derancourt is currently working on a prototype for this feature. |
Sorry @marcphilipp I was on vacation when you sent that and it got lost in the weeds. I'd be willing to help if I can. @juliette-derancourt - let me know if there is something I can do |
@sebersole Thanks for the offer! |
@juliette-derancourt I took a look at the PR, but have to admit that most of it is beyond my knowledge of JUnit internals. But I think I got the gist... It revolves around |
@sebersole Yes, that would work like this 👍 |
Looks beautiful to me :) |
If I may, can we imagine this as a building block for the classloader extension discussed in #201 ? The next move could be to build at start up (and run with it) a class loader such as: boot -> platform -> junit-related urlCL -> what's left urlCL This later would allow an extension point to let users decide how to build their custom classloader as long as the junit-related urlCL is in the parent chain. WDYT ? |
@ledoyen, I don't see how this new Jupiter feature is related to the Platform-level This particular new feature doesn't have anything to do with class loading. |
@sbrannen, sorry I rushed into this a little fast, I was thinking of my current implementation of an extension using custom classloaders which lacks compatibility with other extensions and will benefit from this new feature. However, from the JUnit framework perspective, this is no different than the actual test method invocation which already exists and indeed brings nothing to the classloader topic. Sorry for that 😞 |
No worries, @ledoyen 👍 |
I am working on an extension for tests to be able to react to failed tests or tests that end in exception by including a method annotated with
@OnFailure
.My specific high-level "requirement" is to be able to rebuild a Hibernate
SessionFactory
in these cases. That method needs access to theSessionFactory
to be rebuilt. Actually it is aSessionFactoryScope
class that manages aSessionFactory
and exposes it via aParameterResolver
. E.g.If this test fails, I'd like to be able to access the
SessionFactoryScope
to trigger it to release itsSessionFactory
and build a new one. To do that it needs access to theSessionFactoryScope
. I.e.:Currently, JUnit Jupiter does not allow access to registered ParameterResolvers nor any way to invoke such "extension methods" with resolved parameter arguments.
Seems like a generally useful feature.
The text was updated successfully, but these errors were encountered: