ZOOKEEPER-5012: guard zkDb close in QuorumPeer shutdown#2345
Open
seekskyworld wants to merge 7 commits intoapache:masterfrom
Open
ZOOKEEPER-5012: guard zkDb close in QuorumPeer shutdown#2345seekskyworld wants to merge 7 commits intoapache:masterfrom
seekskyworld wants to merge 7 commits intoapache:masterfrom
Conversation
9620c67 to
0703e20
Compare
PDavid
approved these changes
Feb 17, 2026
Contributor
PDavid
left a comment
There was a problem hiding this comment.
Many thanks for the fix, looks good to me. 👍
Just added a small idea.
PDavid
reviewed
Feb 17, 2026
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/QuorumPeerTest.java
Outdated
Show resolved
Hide resolved
Author
|
@PDavid I agree with you. It looks great |
Co-authored-by: Dávid Paksy <paksydavid@gmail.com>
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
Author
|
@PDavid I made two changes: replaced assertDoesNotThrow with a JUnit‑compatible try/catch to keep the “no exception” assertion, and added the missing fail static import so the test compiles. |
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
PDavid
reviewed
Feb 18, 2026
| public void testShutdownWithoutZkDbDoesNotThrow() throws Exception { | ||
| QuorumPeer peer = new QuorumPeer(); | ||
| peer.shutdown(); | ||
| assertDoesNotThrow(peer::shutdown); |
Contributor
There was a problem hiding this comment.
Thanks for trying this out. 👍
I think this should have worked, just you have to add a static import for org.junit.jupiter.api.Assertions.assertDoesNotThrow next to the already existing static imports, e.g.:
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
Author
|
@PDavid You're right. I didn't notice that the import wasn't included in the proposal. It has now been corrected. |
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: https://issues.apache.org/jira/browse/ZOOKEEPER-5012
Summary
Motivation
Validation