ferdelyi commented on code in PR #8222:
URL: https://github.com/apache/hadoop/pull/8222#discussion_r2748289875
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/TestZKConfigurationStore.java:
##########
@@ -198,7 +198,27 @@ public void testDisableAuditLogs() throws Exception {
prepareLogMutation("key1", "val1");
data = ((ZKConfigurationStore) confStore).getZkData(logsPath);
- assertNull(data, "Failed to Disable Audit Logs");
+ assertEquals("Failed to Disable Audit Logs", 0, data.length);
+ }
+
+ @Test
+ public void testZkData() throws Exception {
+ conf.setInt(YarnConfiguration.RM_SCHEDCONF_STORE_ZK_READ_RETRY_SECS, 0);
+ confStore.initialize(conf, schedConf, rmContext);
+ String confStorePath = getZkPath("CONF_STORE");
+ byte[] data = ((ZKConfigurationStore) confStore).getZkData(confStorePath);
+ assertTrue("ConfStore data expected to be not null.", data.length > 0);
+ }
+
+ @Test
+ public void testEmptyZkData() throws Exception {
+ conf.setInt(YarnConfiguration.RM_SCHEDCONF_STORE_ZK_READ_RETRY_SECS, 0);
+ confStore.initialize(conf, schedConf, rmContext);
Review Comment:
Sure, added. Thank you for the suggestion!
--
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]