You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2021/08/11 04:09:40 UTC

[GitHub] [incubator-yunikorn-core] chia7712 commented on a change in pull request #296: YUNIKORN-193 Add option to allow parent to set unmanaged child queue …

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



##########
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:
       you are right.
   
   There is a similar issue in code base (https://github.com/apache/incubator-yunikorn-core/blob/master/pkg/common/resources/resources_test.go#L1550). Maybe we should find out if it contains the expected string one by one. Or we can make DAOString() have consistent order. The benefit is the restful response get more readable. WDTY? I will file a PR to fix existent code.




-- 
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: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org