LI123456mo opened a new issue, #16085:
URL: https://github.com/apache/dubbo/issues/16085

   ### Pre-check
   
   - [x] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar feature requirement.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Descriptions
   
   ### Current Problem
   In the current implementation of StartZookeeperWindowsProcessor.java, there 
is a hardcoded "ugly sleep":
   TimeUnit.SECONDS.sleep(3);
   
   As noted in the TODO comment, this is inefficient and "ugly." It leads to:
   1. Flaky tests on slower CI environments (where 3s isn't enough).
   2. Unnecessary delay on fast environments (where Zookeeper starts in <500ms).
   
   ### Proposed Change
   I suggest replacing this fixed sleep with a proactive health check. Since 
the project already utilizes Apache Curator, we can leverage the 
blockUntilConnected() method to wait for the Zookeeper port to be ready, 
similar to how ResetZookeeperProcessor handles connections.
   
    Also the catch Block should not swallow the errors.
   
   This would align the Windows implementation with the Unix version's more 
reactive approach and improve overall test suite performance.
   
   ### Affected File
   
dubbo-test/dubbo-test-check/src/main/java/org/apache/dubbo/test/check/registrycenter/processor/StartZookeeperWindowsProcessor.java
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [ ] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to