limbooverlambda opened a new pull request, #2458: URL: https://github.com/apache/helix/pull/2458
### Issues Refactoring the testHelixViewAggregator by removing Thread.sleep and using awaitility within the TestHelper to specify a poll frequency for verifications. - [x] My PR addresses the following Helix issues and references them in the PR description: #2438 ### Description While looking at the failed test run logs it was observed that one of the rebalance operations (the third rebalance call) was not getting invoked. The assertions to verify the MockViewClusterSpectator state failed after the `Thread.sleep() `expired. The likely hypothesis is that the timeout duration of 7 seconds was not sufficient for the ClusterSpectator state to reach steady state. So instead of leveraging `Thread.sleep() `to wait for the cluster to reach steady state in this PR we are using `TestHelper.verify` to check for the desired state. ### Tests - The following is the result of the "mvn test" command on the appropriate module: [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running TestSuite Start zookeeper at localhost:2183 in thread main Creating resources ... Rebalancing resources ... Rebalancing resources ... Rebalancing resources ... AfterClass: TestHelixViewAggregator called. AfterClass: TestSourceClusterDataProvider called. AfterClass: TestViewClusterRefresher called. AfterClass: TestViewClusterDataCache called. Shut down zookeeper at port 2183 in thread main [INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 73.581 s - in TestSuite [INFO] [INFO] Results: [INFO] [INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0 [INFO] ### Code Quality - My diff has been formatted using helix-style.xml (helix-style-intellij.xml if IntelliJ IDE is used) -- 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]
