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



##########
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 is intentional one line. `new throwable().printstacktrace()` would 
give you multiple lines. That is used for true exception logging. 
   
   This is not really exception. Just a hint that verify() did not finish in 
time. We don't want to mix both case for easy reading the test output.
   
   This Arrays.asList is used also in other places in our 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.

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