Skip to content

[Optimization] Improve Zookeeper startup wait logic in StartZookeeperWindowsProcessor#16150

Open
Senrian wants to merge 1 commit intoapache:3.3from
Senrian:fix/zookeeper-startup-wait
Open

[Optimization] Improve Zookeeper startup wait logic in StartZookeeperWindowsProcessor#16150
Senrian wants to merge 1 commit intoapache:3.3from
Senrian:fix/zookeeper-startup-wait

Conversation

@Senrian
Copy link

@Senrian Senrian commented Mar 20, 2026

What this PR does

Replace the hardcoded TimeUnit.SECONDS.sleep(3) with a Curator-based health check to wait for Zookeeper startup.

Why this is better

  • No more flaky tests: Uses blockUntilConnected() with 3s timeout instead of fixed 3s sleep
  • Faster on fast machines: If Zookeeper starts in 500ms, we proceed immediately
  • Proper error handling: Throws DubboTestException on failure instead of silently ignoring exceptions
  • Consistent with ResetZookeeperProcessor: Uses the same Curator pattern as the Unix version

Related Issue

Fixes #16085

Checklist

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.

[Optimization] Improve Zookeeper startup wait logic in StartZookeeperWindowsProcessor

1 participant