LuciferYang commented on code in PR #2778:
URL: https://github.com/apache/uniffle/pull/2778#discussion_r3767521099
##########
client-spark/spark4/src/test/java/org/apache/spark/shuffle/RssShuffleManagerTest.java:
##########
@@ -161,6 +161,22 @@ public void testRssShuffleManagerInterface() throws
Exception {
assertNull(shuffleManager.getAppId());
}
+ @Test
+ public void testShuffleBlockResolver() {
+ setupMockedRssShuffleUtils(StatusCode.SUCCESS);
+
+ SparkConf conf = new SparkConf();
+ conf.set(RssSparkConfig.RSS_DYNAMIC_CLIENT_CONF_ENABLED.key(), "false");
+ conf.set(RssSparkConfig.RSS_COORDINATOR_QUORUM.key(), "m1:8001,m2:8002");
+ conf.set("spark.rss.storage.type", StorageType.LOCALFILE.name());
+ conf.set(RssSparkConfig.RSS_TEST_MODE_ENABLE, true);
+
+ RssShuffleManager shuffleManager = new RssShuffleManager(conf, true);
+ ShuffleBlockResolver blockResolver = shuffleManager.shuffleBlockResolver();
+
+ assertTrue(blockResolver.getBlocksForShuffle(1, 1L).isEmpty());
Review Comment:
Suggest adding an assertion like
```java
assertThrowsExactly(RssException.class,
() -> blockResolver.getBlockData(new ShuffleBlockId(0, 0L, 0),
Option.empty()));
```
--
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]