Skip to content

Conversation

bigduu
Copy link

@bigduu bigduu commented Aug 6, 2025

…mbeddedAdapter

Add debug log for some specify situation to help developer identify the issue location

It's will eat the exception if can't find the ZooKeeperServerEmbeddedImpl class in some case, it will makes keep trying startup the zk server with same port. so the unit test will throw the address in used without any useful info.
This change add info for investigate

…mbeddedAdapter

Add debug log for some specify situation to help developer identify the issue location
@Copilot Copilot AI review requested due to automatic review settings August 6, 2025 12:27
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds debug logging to improve troubleshooting when ZooKeeper client port hijacking fails in the test framework. The change helps developers identify issues when the ZooKeeperServerEmbeddedImpl class cannot be found, which can lead to repeated startup attempts with the same port and confusing "address in use" errors.

Key Changes

  • Enhanced exception handling in the hijackClientPort method to capture and log hijack failures
  • Improved debugging capabilities for ZooKeeper server startup issues in unit tests

…rverEmbeddedAdapter.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kezhuw
Copy link
Member

kezhuw commented Aug 18, 2025

It's will eat the exception if can't find the ZooKeeperServerEmbeddedImpl class in some case

I expect this should be covered by:

https://github.com/apache/curator/blob/master/curator-test/src/main/java/org/apache/curator/test/TestingZooKeeperServer.java#L42-L51

How did you using it ? I expect people use TestingServer instead of this directly.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants