Skip to content

Commit

Permalink
[MINOR] fix: flaky test ShuffleTaskManagerTest#checkAndClearLeakShuff…
Browse files Browse the repository at this point in the history
…leDataTest (#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 e1a5499)
  • Loading branch information
xianjingfeng committed Nov 20, 2023
1 parent 3904cbd commit 42b5c21
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -936,8 +936,9 @@ public void checkAndClearLeakShuffleDataTest(@TempDir File tempDir) throws Excep
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
Expand Down

0 comments on commit 42b5c21

Please sign in to comment.