p-szucs commented on code in PR #5320: URL: https://github.com/apache/hadoop/pull/5320#discussion_r1087770675
########## hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/converter/TestFSConfigToCSConfigConverter.java: ########## @@ -214,31 +216,31 @@ public void testDefaultMaxAMShareDisabled() throws Exception { converter.convert(params); - Configuration conf = converter.getCapacitySchedulerConfig(); + CapacitySchedulerConfiguration conf = converter.getCapacitySchedulerConfig(); // -1.0 means disabled ==> 1.0 in CS assertEquals("Default max-am-resource-percent", "1.0", conf.get(CapacitySchedulerConfiguration. MAXIMUM_APPLICATION_MASTERS_RESOURCE_PERCENT)); - // root.admins.bob -1.0 equals to the default -1.0 - assertNull("root.admins.bob maximum-am-resource-percent should be null", - conf.get(PREFIX + "root.admins.bob.maximum-am-resource-percent")); + // root.admins.bob is unset,so falling back to the global value + assertEquals("root.admins.bob maximum-am-resource-percent", 1.0f, + conf.getMaximumApplicationMasterResourcePerQueuePercent("root.admins.bob"), 0.0f); // root.admins.alice 0.15 != -1.0 - assertEquals("root.admins.alice max-am-resource-percent", "0.15", - conf.get(PREFIX + "root.admins.alice.maximum-am-resource-percent")); + assertEquals("root.admins.alice max-am-resource-percent", 0.15f, + conf.getMaximumApplicationMasterResourcePerQueuePercent("root.admins.alice"), 0.0f); - // root.users.joe is unset, inherits -1.0 - assertNull("root.users.joe maximum-am-resource-percent should be null", - conf.get(PREFIX + "root.users.joe.maximum-am-resource-percent")); + // root.users.joe is unset,so falling back to the global value + assertEquals("root.users.joe maximum-am-resource-percent", 1.0f, + conf.getMaximumApplicationMasterResourcePerQueuePercent("root.users.joe"), 0.0f); } @Test public void testConvertACLs() throws Exception { converter.convert(config); - Configuration conf = converter.getCapacitySchedulerConfig(); + CapacitySchedulerConfiguration conf = converter.getCapacitySchedulerConfig(); // root assertEquals("root submit ACL", "alice,bob,joe,john hadoop_users", Review Comment: There is a getAcl() method in the config class which you can use in this test case. -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org