wilfred-s commented on a change in pull request #296:
URL: 
https://github.com/apache/incubator-yunikorn-core/pull/296#discussion_r688204389



##########
File path: pkg/scheduler/objects/queue_test.go
##########
@@ -1338,10 +1340,203 @@ func TestSupportTaskGroup(t *testing.T) {
        assert.Assert(t, !leaf.SupportTaskGroup(), "leaf queue (FAIR policy) 
should not support task group")
 }
 
-func TestGetPartitionQueues(t *testing.T) {
+func TestGetPartitionQueueDAOInfo(t *testing.T) {
        root, err := createRootQueue(nil)
        assert.NilError(t, err, "failed to create basic root queue: %v", err)
-       root.properties = make(map[string]string)
-       root.properties["key"] = "value"
-       assert.Equal(t, "value", root.GetPartitionQueues().Properties["key"])
+
+       // test properties
+       root.properties = getProperties()
+       assert.Assert(t, reflect.DeepEqual(root.properties, 
root.GetPartitionQueueDAOInfo().Properties))
+
+       // test template
+       root.template = template.NewTemplate(getProperties(), getResource(t), 
getResource(t))
+       assert.Assert(t, reflect.DeepEqual(root.template.GetProperties(), 
root.GetPartitionQueueDAOInfo().TemplateInfo.Properties))
+       assert.Equal(t, root.template.GetMaxResource().DAOString(), 
root.GetPartitionQueueDAOInfo().TemplateInfo.MaxResource)

Review comment:
       We need a follow up PR. I would suggest that calls that do not directly 
test `DAOString()` we use single resource values.
   In the test case for for `DAOString()` only test the nil, empty and single 
value cases for full equality and a multi valued resource for the layout 
markers. This might need to be done for more tests.




-- 
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]


Reply via email to