This is an automated email from the ASF dual-hosted git repository.
zuston pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 81d23c01 Flaky Test:
AppBalanceSelectStorageStrategyTest#selectStorageTest (#438)
81d23c01 is described below
commit 81d23c012c48bba84cef5aa16260767ecfd2fa03
Author: jokercurry <[email protected]>
AuthorDate: Sun Dec 18 17:49:44 2022 +0800
Flaky Test: AppBalanceSelectStorageStrategyTest#selectStorageTest (#438)
### What changes were proposed in this pull request?
To avoid the possible exception of reading and writing HDFS files during
the test, we must ensure that `hdfs://path1` and `hdfs://path2` are all normal
paths.
### Why are the changes needed?
For fix bug mentioned in issue #430
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
1. UTs
---
.../strategy/storage/AppBalanceSelectStorageStrategyTest.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/coordinator/src/test/java/org/apache/uniffle/coordinator/strategy/storage/AppBalanceSelectStorageStrategyTest.java
b/coordinator/src/test/java/org/apache/uniffle/coordinator/strategy/storage/AppBalanceSelectStorageStrategyTest.java
index 9a0b0b33..c92c8d88 100644
---
a/coordinator/src/test/java/org/apache/uniffle/coordinator/strategy/storage/AppBalanceSelectStorageStrategyTest.java
+++
b/coordinator/src/test/java/org/apache/uniffle/coordinator/strategy/storage/AppBalanceSelectStorageStrategyTest.java
@@ -78,6 +78,9 @@ public class AppBalanceSelectStorageStrategyTest {
String testApp1 = "application_test_" + 1;
applicationManager.registerApplicationInfo(testApp1, "user");
applicationManager.refreshAppId(testApp1);
+ // in this case, ensure that all the paths are read and written normally
+
applicationManager.getRemoteStoragePathRankValue().get(remotePath1).getCostTime().set(0);
+
applicationManager.getRemoteStoragePathRankValue().get(remotePath2).getCostTime().set(0);
assertEquals(remotePath2,
applicationManager.pickRemoteStorage(testApp1).getPath());
assertEquals(remotePath2,
applicationManager.getAppIdToRemoteStorageInfo().get(testApp1).getPath());
assertEquals(1,
applicationManager.getRemoteStoragePathRankValue().get(remotePath2).getAppNum().get());