brumi1024 commented on a change in pull request #3660:
URL: https://github.com/apache/hadoop/pull/3660#discussion_r765113653
##########
File path:
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestQueuePath.java
##########
@@ -54,6 +54,20 @@ public void testEmptyPart() {
Assert.assertFalse(queuePathWithoutEmptyPart.hasEmptyPart());
}
+ @Test
+ public void testNullPath() {
+ QueuePath queuePathWithNullPath = new QueuePath(null);
+ String parentOfQueueWithNullPath = queuePathWithNullPath.getParent();
+ String leafOfQueueWithNullPath = queuePathWithNullPath.getLeafName();
+ String fullPathOfQueueWithNullPath = queuePathWithNullPath.getFullPath();
+ boolean isTheQueueWithNullPathRoot = queuePathWithNullPath.isRoot();
+
+ Assert.assertEquals(parentOfQueueWithNullPath, null);
+ Assert.assertEquals(leafOfQueueWithNullPath, "");
+ Assert.assertEquals(fullPathOfQueueWithNullPath, "");
+ Assert.assertFalse(isTheQueueWithNullPathRoot);
Review comment:
Additionally assert has the order reversed: expected, actual. Can you
please fix the parameter ordering?
--
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]