pbacsko commented on code in PR #871:
URL: https://github.com/apache/yunikorn-core/pull/871#discussion_r1611909941
##########
pkg/scheduler/objects/sorters_test.go:
##########
@@ -276,6 +292,15 @@ func TestSortAppsFair(t *testing.T) {
// apps should come back in order: 3, 0, 2, 1
list = sortApplications(input, policies.FairSortPolicy, false,
resources.Multiply(res, 5))
assertAppList(t, list, []int{1, 3, 2, 0}, "app-1 & app-3 allocated")
+
+ // update allocated resource for app-3 & app-1 where priority of app-3
is higher
+ input["app-1"].allocatedResource = resources.Multiply(res, 10)
+ input["app-1"].askMaxPriority = 2
+ input["app-3"].allocatedResource = resources.Multiply(res, 10)
+ input["app-3"].askMaxPriority = 3
+ list = sortApplications(input, policies.FairSortPolicy, false,
resources.Multiply(res, 5))
+ // apps should come back in order: 0, 2, 3, 1
+ assertAppList(t, list, []int{0, 3, 1, 2}, "app-1 & app-3 allocated,
app-3 high priority")
Review Comment:
Nit: comment is inconsistent with the 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]