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
Make operations on NamespacedHierarchicalStore
fail if it's closed
#3800
Conversation
NamespacedHierarchicalStore
fail if it's closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I've requested a few minor changes.
...ngine/src/main/java/org/junit/platform/engine/support/store/NamespacedHierarchicalStore.java
Outdated
Show resolved
Hide resolved
...ngine/src/main/java/org/junit/platform/engine/support/store/NamespacedHierarchicalStore.java
Outdated
Show resolved
Hide resolved
...ngine/src/main/java/org/junit/platform/engine/support/store/NamespacedHierarchicalStore.java
Outdated
Show resolved
Hide resolved
...ngine/src/main/java/org/junit/platform/engine/support/store/NamespacedHierarchicalStore.java
Outdated
Show resolved
Hide resolved
...ngine/src/main/java/org/junit/platform/engine/support/store/NamespacedHierarchicalStore.java
Outdated
Show resolved
Hide resolved
...ngine/src/main/java/org/junit/platform/engine/support/store/NamespacedHierarchicalStore.java
Outdated
Show resolved
Hide resolved
...ngine/src/main/java/org/junit/platform/engine/support/store/NamespacedHierarchicalStore.java
Outdated
Show resolved
Hide resolved
.../src/test/java/org/junit/platform/engine/support/store/NamespacedHierarchicalStoreTests.java
Outdated
Show resolved
Hide resolved
.../src/test/java/org/junit/platform/engine/support/store/NamespacedHierarchicalStoreTests.java
Outdated
Show resolved
Hide resolved
.../src/test/java/org/junit/platform/engine/support/store/NamespacedHierarchicalStoreTests.java
Outdated
Show resolved
Hide resolved
9976b4e
to
a49e575
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the requested changes.
All that's missing now is an entry in the release notes.
So, please add a release note here: https://github.com/junit-team/junit5/blob/main/documentation/src/docs/asciidoc/release-notes/release-notes-5.11.0-M2.adoc#new-features-and-improvements-1
Track the active/closed state in NamespacedHierarchicalStore so it can throw an IllegalStateException when doing a modification/query on it after it has been already closed. Make a close operation on an already closed store a no-op. Issue: junit-team#3614
a49e575
to
67a289b
Compare
FYI: this has been further revised in d6a6eb8 to address two bugs. |
Overview
Track the active/closed state in NamespacedHierarchicalStore so it can throw an IllegalStateException when doing a modification/query on it after it has been already closed.
Make a close operation on an already closed store a no-op.
Issue: #3614
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotationsDeliverables
NamespacedHierarchicalStore
tracks its active/closed stateNamespacedHierarchicalStore
throws an exception for modification or query calls after it has been closedNamespacedHierarchicalStore.close()
is idempotent