-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Introduce feature flag for auto-closing AutoCloseable
in Jupiter's ExtensionContext.Store
#4434
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
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. |
SGTM! 👍
I'll do my best to get it merged soon, hopefully this afternoon. |
Issue junit-team#4434
Issue junit-team#4434
Issue junit-team#4434
Currently, only instances of
CloseableResource
that are stored in anExtensionContext.Store
are closed automatically when theExtensionContext
is closed. However, items stored in the session-/request-level stores only need to implementAutoCloseable
. To address this confusing difference in behavior, we should introduce a configuration parameter that allows to treatAutoCloseable
likeCloseableResource
in Jupiter's stores. It should be "on" by default in 5.13.Deliverables
AutoCloseable
objects (true
by default)CloseableResource
MakeDoesn't work becauseCloseableResource
extendAutoCloseable
so existing implementations would keep workingCloseableResource#close
is allowed to throwThrowable
, not justException
put intoencountered while closing theStore
that implementsCloseableResource
but notAutoCloseable
(if the feature is on)CloseableResource
andAutoCloseable
should they need to support pre-5.13 versions)The text was updated successfully, but these errors were encountered: