From aed2ebbd125cdb6d0047b184df31d17678fb4d0e Mon Sep 17 00:00:00 2001 From: Yubin Li Date: Mon, 23 Dec 2024 17:49:53 +0800 Subject: [PATCH] [log] Enhance CommonTestUtils#retry log for easier troubleshooting --- .../com/alibaba/fluss/testutils/common/CommonTestUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fluss-test-utils/src/main/java/com/alibaba/fluss/testutils/common/CommonTestUtils.java b/fluss-test-utils/src/main/java/com/alibaba/fluss/testutils/common/CommonTestUtils.java index b1436983..bd3f6077 100644 --- a/fluss-test-utils/src/main/java/com/alibaba/fluss/testutils/common/CommonTestUtils.java +++ b/fluss-test-utils/src/main/java/com/alibaba/fluss/testutils/common/CommonTestUtils.java @@ -144,7 +144,10 @@ public static void retry(Duration timeout, Executable assertion) { if (System.currentTimeMillis() - startTime >= maxWaitMs) { throw t; } - LOG.info("Attempt failed, sleeping for {} ms, and then retrying.", waitMs); + LOG.info( + "Attempt failed, sleeping for {} ms, and then retrying. caused by: {}\n", + waitMs, + t.getMessage()); try { //noinspection BusyWait Thread.sleep(waitMs);