Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#5213] fix(test): Increase the timeout to avoid flaky test (#5613)

Jerry Shaof9013ffee553
diff --git a/catalogs/catalog-hive/src/test/java/org/apache/gravitino/catalog/hive/TestFetchFileUtils.java b/catalogs/catalog-hive/src/test/java/org/apache/gravitino/catalog/hive/TestFetchFileUtils.java
index 31904e669f..9ca344632b 100644
--- a/catalogs/catalog-hive/src/test/java/org/apache/gravitino/catalog/hive/TestFetchFileUtils.java
+++ b/catalogs/catalog-hive/src/test/java/org/apache/gravitino/catalog/hive/TestFetchFileUtils.java
@@ -65,10 +65,10 @@ public class TestFetchFileUtils {
boolean success = false;
int attempts = 0;
- while (!success && attempts < MAX_RETRIES) {
+ while (!success) {
try {
LOG.info("Attempting to download file from URL: {} (Attempt {})", fileUrl, attempts + 1);
- FetchFileUtils.fetchFileFromUri(fileUrl, destFile, 10, conf);
+ FetchFileUtils.fetchFileFromUri(fileUrl, destFile, 45, conf);
success = true;
LOG.info("File downloaded successfully on attempt {}", attempts + 1);
} catch (IOException e) {
@@ -76,7 +76,7 @@ public class TestFetchFileUtils {
LOG.error("Download attempt {} failed due to: {}", attempts, e.getMessage(), e);
if (attempts < MAX_RETRIES) {
long retryDelay = INITIAL_RETRY_DELAY_MS * (1L << (attempts - 1));
- LOG.warn("Retrying in {}ms", retryDelay);
+ LOG.warn("Retrying in {} ms", retryDelay);
Thread.sleep(retryDelay);
} else {
throw new AssertionError("Failed to download file after " + MAX_RETRIES + " attempts", e);