pkuwm commented on a change in pull request #1447:
URL: https://github.com/apache/helix/pull/1447#discussion_r501325304



##########
File path: helix-core/src/test/java/org/apache/helix/TestHelper.java
##########
@@ -799,7 +799,12 @@ public static boolean verify(Verifier verifier, long 
timeout) throws Exception {
     long start = System.currentTimeMillis();
     do {
       boolean result = verifier.verify();
-      if (result || (System.currentTimeMillis() - start) > timeout) {
+      boolean isTimedout = (System.currentTimeMillis() - start) > timeout;
+      if (result || isTimedout) {
+        if (isTimedout && !result) {
+          LOG.error("verifier time out, consider try longer timeout, stack 
trace{}",
+              Arrays.asList(Thread.currentThread().getStackTrace()));

Review comment:
       The stack trace will be printed in one line with this code. I suggest we 
use `new throwable().printstacktrace()`




----------------------------------------------------------------
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]



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

Reply via email to