wilfred-s commented on code in PR #1088:
URL: https://github.com/apache/yunikorn-core/pull/1088#discussion_r3354759049


##########
pkg/scheduler/objects/queue_test.go:
##########
@@ -44,6 +44,167 @@ import (
 )
 
 // base test for creating a managed queue
+func TestMergeParentPropertiesNilParent(t *testing.T) {
+       // root queue has no parent, MergeParentProperties should be a no-op
+       root, err := createRootQueue(nil)
+       assert.NilError(t, err, "root queue create failed")
+       root.properties = map[string]string{"key": "value"}
+
+       root.MergeParentProperties(map[string]string{"other": "other-value"})
+
+       // properties should remain unchanged since root has no parent to merge 
from
+       props := root.getProperties()
+       assert.Equal(t, "value", props["key"], "root queue properties should 
not be modified by MergeParentProperties")

Review Comment:
   I overlooked one mistake in this test: line 53 replaces the properties via 
the config on the root queue. The assumption inline 55 is thus not correct as 
the replacement is not triggered by the parent but by the new config value 
passed in.
   We should have the same map content passed in as the config value to leave 
the current value on the root queue. Otherwise we should expect the newly 
passed in list from the config to be present



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