This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 28e9c886ba [test] Fix flaky test for CloneActionITCase (#6100)
28e9c886ba is described below

commit 28e9c886baa2b4597ebf679ce571fc2ff8e1b171
Author: Arnav Balyan <[email protected]>
AuthorDate: Wed Aug 20 07:39:56 2025 +0530

    [test] Fix flaky test for CloneActionITCase (#6100)
---
 .../paimon/hive/procedure/CloneActionITCase.java   | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git 
a/paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/procedure/CloneActionITCase.java
 
b/paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/procedure/CloneActionITCase.java
index e1d28d94b9..d6ff369c1b 100644
--- 
a/paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/procedure/CloneActionITCase.java
+++ 
b/paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/procedure/CloneActionITCase.java
@@ -915,10 +915,24 @@ public class CloneActionITCase extends ActionITCaseBase {
     }
 
     private List<Row> sql(TableEnvironment tEnv, String query, Object... args) 
{
-        try (CloseableIterator<Row> iter = 
tEnv.executeSql(String.format(query, args)).collect()) {
-            return ImmutableList.copyOf(iter);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
+        String formattedQuery = String.format(query, args);
+        Exception lastException = null;
+
+        for (int attempt = 1; attempt <= 5; attempt++) {
+            try (CloseableIterator<Row> iter = 
tEnv.executeSql(formattedQuery).collect()) {
+                return ImmutableList.copyOf(iter);
+            } catch (Exception e) {
+                lastException = e;
+                if (attempt < 5) {
+                    try {
+                        Thread.sleep(60_000); // 1 minute between attempts
+                    } catch (InterruptedException ie) {
+                        Thread.currentThread().interrupt();
+                        break;
+                    }
+                }
+            }
         }
+        throw new RuntimeException(lastException);
     }
 }

Reply via email to