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

Make operations on NamespacedHierarchicalStore fail if it's closed #3800

Closed

Conversation

mobounya
Copy link
Contributor

@mobounya mobounya commented Apr 28, 2024

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


Deliverables

  • NamespacedHierarchicalStore tracks its active/closed state
  • NamespacedHierarchicalStore throws an exception for modification or query calls after it has been closed
  • NamespacedHierarchicalStore.close() is idempotent

@sbrannen sbrannen changed the title Make operations on NamespacedHierarchicalStore fail if it's closed Make operations on NamespacedHierarchicalStore fail if it's closed Apr 29, 2024
Copy link
Member

@sbrannen sbrannen left a 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.

@sbrannen sbrannen linked an issue Apr 29, 2024 that may be closed by this pull request
3 tasks
@mobounya mobounya force-pushed the bug-fail_on_mods_after_close branch from 9976b4e to a49e575 Compare April 29, 2024 19:43
@mobounya mobounya requested a review from sbrannen April 29, 2024 20:07
Copy link
Member

@sbrannen sbrannen left a 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
@mobounya mobounya force-pushed the bug-fail_on_mods_after_close branch from a49e575 to 67a289b Compare April 30, 2024 22:27
@mobounya mobounya requested a review from sbrannen April 30, 2024 22:28
@sbrannen sbrannen self-assigned this May 1, 2024
@sbrannen sbrannen closed this in 551188e May 1, 2024
sbrannen added a commit that referenced this pull request May 1, 2024
@sbrannen
Copy link
Member

sbrannen commented May 1, 2024

This has been merged into main in 551188e and revised in 2cadc08.

Thanks for the contribution!

@sbrannen
Copy link
Member

sbrannen commented May 6, 2024

FYI: this has been further revised in d6a6eb8 to address two bugs.

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

Successfully merging this pull request may close these issues.

NamespacedHierarchicalStore should fail on modifications after close
2 participants