Manikandan R created YUNIKORN-3245:
--------------------------------------
Summary: Queue properties has old values even after passing empty
properties map
Key: YUNIKORN-3245
URL: https://issues.apache.org/jira/browse/YUNIKORN-3245
Project: Apache YuniKorn
Issue Type: Bug
Components: core - scheduler
Reporter: Manikandan R
Queue props can be set by passing `properties` map to `updateQueueProperties`
function. After setting non-empty map, Queue variables are set accordingly.
In case empty `properties` map, values of Queue variables still remains same
and not reset to default values. It is not correct and needs to fixed.
Below code shows the problem:
{code:java}
func TestUpdateQueueProperties(t *testing.T) {
root, err := createRootQueue(nil)
assert.NilError(t, err, "failed to create basic root queue: %v", err)
// Test specific queue
var leaf *Queue
leaf, err = createManagedQueue(root, "leaf-queue", false, nil)
assert.NilError(t, err, "failed to create managed queue")
leaf.properties = map[string]string{
configs.ApplicationSortPolicy: policies.FairSortPolicy.String(),
configs.PreemptionPolicy: policies.FencePreemptionPolicy.String(),
}
leaf.UpdateQueueProperties(nil)
assert.Equal(t, leaf.sortType.String(), policies.FairSortPolicy.String(),
"incorrect sort policy")
assert.Equal(t, leaf.preemptionPolicy.String(),
policies.FencePreemptionPolicy.String(), "incorrect preemption policy")
leaf.properties = map[string]string{}
leaf.UpdateQueueProperties(nil)
assert.Equal(t, leaf.sortType.String(), policies.FairSortPolicy.String(),
"incorrect sort policy")
assert.Equal(t, leaf.preemptionPolicy.String(),
policies.FencePreemptionPolicy.String(), "incorrect preemption policy")
}{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]