Skip to content
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

Introduce feature flag for auto-closing AutoCloseable in Jupiter's ExtensionContext.Store #4434

Open
3 tasks
marcphilipp opened this issue Mar 28, 2025 · 2 comments

Comments

@marcphilipp
Copy link
Member

marcphilipp commented Mar 28, 2025

Currently, only instances of CloseableResource that are stored in an ExtensionContext.Store are closed automatically when the ExtensionContext is closed. However, items stored in the session-/request-level stores only need to implement AutoCloseable. To address this confusing difference in behavior, we should introduce a configuration parameter that allows to treat AutoCloseable like CloseableResource in Jupiter's stores. For backward compatibility, it should be "off" by default in 5.13 but "on" in 6.0.

Deliverables

  • Introduce configuration parameter
  • Deprecate CloseableResource
  • Make CloseableResource extend AutoCloseable so existing implementations would keep working
@YongGoose
Copy link
Contributor

I have knowledge of session/request-level stores, so this issue seemed even more interesting to me. 🙂

I went ahead and did some work on it in my personal repository. After the PR below is merged, I believe it makes sense to continue the work from there, so I branched off from that branch to proceed with the task.

If the JUnit team plans to address this issue, I will focus on other tasks.
However, if there are no plans at the moment, I would like to take a crack at it.

@marcphilipp
Copy link
Member Author

However, if there are no plans at the moment, I would like to take a crack at it.

SGTM! 👍

After the PR below is merged, I believe it makes sense to continue the work from there, so I branched off from that branch to proceed with the task.

I'll do my best to get it merged soon, hopefully this afternoon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants