Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankert01 committed Dec 28, 2024
1 parent 02895df commit b7ac2fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/scheduler/ugm/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,14 +727,15 @@ func TestDecreaseTrackedResourceForGroupTracker(t *testing.T) {
assert.Equal(t, resources.Equals(groupTracker.queueTracker.childQueueTrackers["parent"].resourceUsage, resources.Zero), true)

// case 2: DecreaseTrackedResource with nil config limits
conf.Queues[0].Queues[0].Limits = nil
assert.NilError(t, manager.UpdateConfig(conf.Queues[0], "root"))
manager.IncreaseTrackedResource("root.parent", TestApp1, usage, user)
groupTracker = m.GetGroupTracker(user.Groups[0])
assert.Equal(t, groupTracker != nil, true)
assert.Equal(t, groupTracker.queueTracker.childQueueTrackers["parent"].runningApplications[TestApp1], true)
assert.Equal(t, resources.Equals(groupTracker.queueTracker.childQueueTrackers["parent"].resourceUsage, usage), true)

conf.Queues[0].Queues[0].Limits = nil
assert.NilError(t, manager.UpdateConfig(conf.Queues[0], "root"))

manager.DecreaseTrackedResource("root.parent", TestApp1, usage, user, true)
groupTracker = m.GetGroupTracker(user.Groups[0])
assert.Equal(t, groupTracker == nil, true)
Expand Down

0 comments on commit b7ac2fd

Please sign in to comment.