rickyma commented on code in PR #1676:
URL:
https://github.com/apache/incubator-uniffle/pull/1676#discussion_r1591059043
##########
server/src/test/java/org/apache/uniffle/server/storage/LocalStorageManagerTest.java:
##########
@@ -209,21 +218,33 @@ public void testInitializeLocalStorage() {
// case2: when candidates exist, it should initialize successfully.
conf.set(
- ShuffleServerConf.RSS_STORAGE_BASE_PATH, Arrays.asList("/a/rss-data",
"/tmp/rss-data-1"));
+ ShuffleServerConf.RSS_STORAGE_BASE_PATH,
+ Arrays.asList(storageBaseDir1.getAbsolutePath(),
rootRestrictedDir1.getAbsolutePath()));
LocalStorageManager localStorageManager = new LocalStorageManager(conf);
assertEquals(1, localStorageManager.getStorages().size());
// case3: all ok
conf.set(
ShuffleServerConf.RSS_STORAGE_BASE_PATH,
- Arrays.asList("/tmp/rss-data-1", "/tmp/rss-data-2"));
+ Arrays.asList(storageBaseDir1.getAbsolutePath(),
storageBaseDir2.getAbsolutePath()));
localStorageManager = new LocalStorageManager(conf);
assertEquals(2, localStorageManager.getStorages().size());
- // case4: only have 1 candidate, but exceed the number of
+ // case4: after https://github.com/apache/incubator-uniffle/pull/616
+ // dirs will be created automatically if they do not exist
Review Comment:
after https://github.com/apache/incubator-uniffle/pull/616, dirs will be
created automatically if they do not exist. This means the test cases in
`testInitializeLocalStorage` have been outdated for a long time.
##########
server/src/test/java/org/apache/uniffle/server/storage/LocalStorageManagerTest.java:
##########
@@ -209,21 +218,33 @@ public void testInitializeLocalStorage() {
// case2: when candidates exist, it should initialize successfully.
conf.set(
- ShuffleServerConf.RSS_STORAGE_BASE_PATH, Arrays.asList("/a/rss-data",
"/tmp/rss-data-1"));
+ ShuffleServerConf.RSS_STORAGE_BASE_PATH,
+ Arrays.asList(storageBaseDir1.getAbsolutePath(),
rootRestrictedDir1.getAbsolutePath()));
LocalStorageManager localStorageManager = new LocalStorageManager(conf);
assertEquals(1, localStorageManager.getStorages().size());
// case3: all ok
conf.set(
ShuffleServerConf.RSS_STORAGE_BASE_PATH,
- Arrays.asList("/tmp/rss-data-1", "/tmp/rss-data-2"));
+ Arrays.asList(storageBaseDir1.getAbsolutePath(),
storageBaseDir2.getAbsolutePath()));
localStorageManager = new LocalStorageManager(conf);
assertEquals(2, localStorageManager.getStorages().size());
- // case4: only have 1 candidate, but exceed the number of
+ // case4: after https://github.com/apache/incubator-uniffle/pull/616
+ // dirs will be created automatically if they do not exist
Review Comment:
After https://github.com/apache/incubator-uniffle/pull/616, dirs will be
created automatically if they do not exist. This means the test cases in
`testInitializeLocalStorage` have been outdated for a long time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]