-
-
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
Provide mechanism for managing resources across engines and executions #2816
Comments
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. Thank you for your contribution. |
This issue has been automatically closed due to inactivity. If you have a good use case for this feature, please feel free to reopen the issue. |
Hi @marcphilipp, if there is interest in this feature, I can take a stab at implementing this. Though I'm pretty new to the Junit codebase and would have to familiarize myself first. |
I have interest, I'm interested in making an attempt at a change based on this for the cucumber jvm project. |
@PinkFloyded @terencenmnpan Thanks for offering! Has either of you already put some thought into where/how you'd envision the Launcher API to change? I think starting on this will require a core team decision first but a concrete proposal would speed things up. |
@marcphilipp @terencenmnpan @PinkFloyded any updates? |
@YongGoose No, there are no updates. Are you interested in writing up a (short) proposal for discussion? |
Yes, I'm interested in writing up a proposal. However, it will take me a few days to conduct a thorough analysis and put together a detailed proposal. |
Sure, no worries! 👍 |
@marcphilipp
|
One idea I had in the meantime would be to build upon #3064. We could create both a session-level and request-level instance of |
Issue: junit-team#2816 Signed-off-by: yongjunhong <kevin0928@naver.com>
Issue: junit-team#2816 Signed-off-by: yongjunhong <kevin0928@naver.com>
The comment was truly awesome 👍🏻 #2816 (comment) While writing the proposal, I initially considered a So instead of completing the proposal, I implemented the comment within my personal workspace. The work has been divided into several steps:
If my implementation approach is suitable, I am willing to contribute. However, if the JUnit team has already decided to proceed with the implementation, |
The Platform should provide an extensible mechanism (
ServiceLoader
?) so that user code can create "closeable resources" that are injected as part of the context received byTestEngine
implementations.This feature is analogous to the
ExtensionContext.Store
concept from Jupiter but takes it to the Platform level. Moreover, it allows to reuse the same resource across multiple executions in aLauncherSession
. We should advocate that resources stored in such a key-value store be immutable until their destruction. If such resources implementAutoCloseable
they will get closed immediately before theLauncherSession
they belong to is closed.The text was updated successfully, but these errors were encountered: