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 b224099fa [test] fix flaky test TestHiveMetastore. (#3960)
b224099fa is described below

commit b224099fa6ed15cf628f1e339a92d4dd1bb920b4
Author: HunterXHunter <[email protected]>
AuthorDate: Wed Aug 14 12:16:06 2024 +0800

    [test] fix flaky test TestHiveMetastore. (#3960)
---
 .../src/test/java/org/apache/paimon/hive/TestHiveMetastore.java      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/paimon-hive/paimon-hive-common/src/test/java/org/apache/paimon/hive/TestHiveMetastore.java
 
b/paimon-hive/paimon-hive-common/src/test/java/org/apache/paimon/hive/TestHiveMetastore.java
index 0cdbb3197..73bb0418c 100644
--- 
a/paimon-hive/paimon-hive-common/src/test/java/org/apache/paimon/hive/TestHiveMetastore.java
+++ 
b/paimon-hive/paimon-hive-common/src/test/java/org/apache/paimon/hive/TestHiveMetastore.java
@@ -98,8 +98,9 @@ public class TestHiveMetastore {
                                         }
                                         String errMsg = "Failed to delete " + 
localDirPath;
                                         try {
-                                            Assert.assertTrue(
-                                                    errMsg, 
fs.delete(localDirPath, true));
+                                            if (!fs.delete(localDirPath, 
true)) {
+                                                Assert.assertFalse(errMsg, 
fs.exists(localDirPath));
+                                            }
                                         } catch (IOException e) {
                                             throw new RuntimeException(errMsg, 
e);
                                         }

Reply via email to