jackjlli commented on a change in pull request #4430: Cleanup un-necessary
setups in HelixSetupUtils
URL: https://github.com/apache/incubator-pinot/pull/4430#discussion_r303184462
##########
File path: pinot-core/src/test/java/org/apache/pinot/util/TestUtils.java
##########
@@ -140,35 +140,32 @@ public static void
ensureDirectoriesExistAndEmpty(@Nonnull File... dirs)
* @param timeoutMs Timeout in milliseconds
* @param errorMessage Error message if condition is not met before timed out
*/
- public static void waitForCondition(@Nonnull Function<Void, Boolean>
condition, long checkIntervalMs, long timeoutMs,
- @Nullable String errorMessage)
- throws Exception {
+ public static void waitForCondition(Function<Void, Boolean> condition, long
checkIntervalMs, long timeoutMs,
Review comment:
I think it's unnecessary to refactor this method. It's better to put while
loop inside the try block. Plus, in your current way you'll need two places to
handle `errorMessage != null` cases.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]