slfan1989 opened a new pull request, #10293: URL: https://github.com/apache/ozone/pull/10293
## What changes were proposed in this pull request? This PR reduces fixed `Thread.sleep` usage in DiskBalancer tests. Some DiskBalancer tests used fixed sleeps to wait for asynchronous state changes or delayed cleanup. Fixed waits can make tests slower than necessary and may also introduce flakiness on slow or busy CI machines. This change replaces those sleeps with condition-based waits using `GenericTestUtils.waitFor`, so the tests continue as soon as the expected condition is met and fail with a timeout if it is not reached. Specifically, the tests now wait for explicit conditions such as: * delayed replica deletion becoming eligible; * container deletion completion; * pending deletion block count changes; * container state transitions to `UNHEALTHY` or `CLOSED`. ## What is the link to the Apache JIRA JIRA: HDDS-15292. Reduce Thread.sleep usage in DiskBalancer tests. ## How was this patch tested? Add Junit Test. -- 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]
