You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uniffle.apache.org by xi...@apache.org on 2023/11/20 07:28:20 UTC
(incubator-uniffle) 02/03: [MINOR] fix: flaky test ShuffleTaskManagerTest#checkAndClearLeakShuffleDataTest (#1320)
This is an automated email from the ASF dual-hosted git repository.
xianjingfeng pushed a commit to branch branch-0.8
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
commit 42b5c21d343ad03a65c9557ffc8bb5f736741829
Author: xianjingfeng <xi...@gmail.com>
AuthorDate: Fri Nov 17 17:00:58 2023 +0800
[MINOR] fix: flaky test ShuffleTaskManagerTest#checkAndClearLeakShuffleDataTest (#1320)
### What changes were proposed in this pull request?
fix flaky test ShuffleTaskManagerTest#checkAndClearLeakShuffleDataTest.
### Why are the changes needed?
ShuffleTaskManagerTest.checkAndClearLeakShuffleDataTest:940 expected:
<false> but was: <true>
The cause of the problem:
Application in shuffleTaskInfos is removed first, and then remove the directory in the local disk.
Refer: org.apache.uniffle.server.ShuffleTaskManager#removeResources
### Does this PR introduce any user-facing change?
No.
### How was this patch tested?
Repeat it for 100 times in my development enviroment.
(cherry picked from commit e1a54999ec2edf280b73e20e76dfcf1d89278d00)
---
.../test/java/org/apache/uniffle/server/ShuffleTaskManagerTest.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/server/src/test/java/org/apache/uniffle/server/ShuffleTaskManagerTest.java b/server/src/test/java/org/apache/uniffle/server/ShuffleTaskManagerTest.java
index 36a089b0e..b87735b37 100644
--- a/server/src/test/java/org/apache/uniffle/server/ShuffleTaskManagerTest.java
+++ b/server/src/test/java/org/apache/uniffle/server/ShuffleTaskManagerTest.java
@@ -936,8 +936,9 @@ public class ShuffleTaskManagerTest extends HadoopTestBase {
File hiddenFile = new File(storageDir + "/" + LocalStorageChecker.CHECKER_DIR_NAME);
hiddenFile.mkdir();
- appIdsOnDisk = getAppIdsOnDisk(localStorageManager);
- assertFalse(appIdsOnDisk.contains(appId));
+ Awaitility.await()
+ .timeout(10, TimeUnit.SECONDS)
+ .until(() -> !getAppIdsOnDisk(localStorageManager).contains(appId));
assertFalse(appIdsOnDisk.contains(LocalStorageChecker.CHECKER_DIR_NAME));
// mock leak shuffle data