pbacsko commented on code in PR #957:
URL: https://github.com/apache/yunikorn-core/pull/957#discussion_r1750061758
##########
pkg/scheduler/objects/utilities_test.go:
##########
@@ -292,6 +293,21 @@ func assertUserResourcesAndGroupResources(t *testing.T,
userGroup security.UserG
assert.Equal(t, resources.Equals(groupResource,
expectedGroupResources), true)
}
+func assertAllocationLog(t *testing.T, ask *Allocation) {
+ log := ask.GetAllocationLog()
+ preemptionPreconditionsFailed := false
+ PreemptionDoesNotHelp := false
+ for _, l := range log {
+ if l.Message == common.PreemptionPreconditionsFailed {
+ preemptionPreconditionsFailed = true
+ } else if l.Message == common.PreemptionDoesNotHelp {
+ PreemptionDoesNotHelp = true
+ }
+ }
+ assert.Assert(t, preemptionPreconditionsFailed, true)
+ assert.Assert(t, PreemptionDoesNotHelp, true)
Review Comment:
nit: "true" is not needed at the end (can be fixed on commit)
--
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]