Skip to content

Commit 3a888f9

Browse files
author
skalva
committed
unit test cases for YARN-11449 changes
1 parent b9d4fca commit 3a888f9

File tree

1 file changed

+19
-0
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity

1 file changed

+19
-0
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestLeafQueue.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5431,4 +5431,23 @@ public void testSubmitUsingRealUserAcls() throws Exception {
54315431
rm.stop();
54325432
rm.close();
54335433
}
5434+
5435+
@Test
5436+
public void testLeafHasAllNodeLabelsOfItsRoot() throws IOException {
5437+
5438+
CapacitySchedulerConfiguration conf = csConf;
5439+
String rootChild = root.getChildQueues().get(0).getQueuePath();
5440+
ParentQueue rootQueue = (ParentQueue) cs.getRootQueue();
5441+
ConfiguredNodeLabels nodeLabelsForAllQueues =
5442+
rootQueue.getQueueContext().getQueueManager().getConfiguredNodeLabelsForAllQueues();
5443+
5444+
QueueNodeLabelsSettings labelsSettings =
5445+
new QueueNodeLabelsSettings(conf, root, new QueuePath(rootQueue.getQueuePath(), "test"), nodeLabelsForAllQueues);
5446+
Assert.assertEquals(labelsSettings.getAccessibleNodeLabels(), "*");
5447+
5448+
labelsSettings = new QueueNodeLabelsSettings(conf, root,
5449+
new QueuePath(rootQueue.getQueuePath(), rootQueue.getChildQueues().get(0).getQueuePath()),
5450+
nodeLabelsForAllQueues);
5451+
Assert.assertEquals(labelsSettings.getAccessibleNodeLabels(), "*");
5452+
}
54345453
}

0 commit comments

Comments
 (0)