zhuqi-lucas commented on code in PR #561:
URL: https://github.com/apache/yunikorn-core/pull/561#discussion_r1221361417
##########
pkg/scheduler/objects/application_test.go:
##########
@@ -1815,18 +1815,18 @@ func TestTryAllocatePreemptNode(t *testing.T) {
// consume capacity with 'unlimited' app
alloc00 :=
app0.tryAllocate(resources.NewResourceFromMap(map[string]resources.Quantity{"first":
40}), 30*time.Second, &preemptionAttemptsRemaining, iterator, iterator,
getNode)
assert.Assert(t, alloc00 != nil, "alloc00 expected")
- alloc01 :=
app0.tryAllocate(resources.NewResourceFromMap(map[string]resources.Quantity{"first":
39}), 30*time.Second, &preemptionAttemptsRemaining, iterator, iterator,
getNode)
+ alloc01 :=
app0.tryAllocate(resources.NewResourceFromMap(map[string]resources.Quantity{"first":
29}), 30*time.Second, &preemptionAttemptsRemaining, iterator, iterator,
getNode)
Review Comment:
The first allocation ask is 11, so we need to 40 - 11 = 29.
##########
pkg/scheduler/objects/application_test.go:
##########
@@ -1815,18 +1815,18 @@ func TestTryAllocatePreemptNode(t *testing.T) {
// consume capacity with 'unlimited' app
alloc00 :=
app0.tryAllocate(resources.NewResourceFromMap(map[string]resources.Quantity{"first":
40}), 30*time.Second, &preemptionAttemptsRemaining, iterator, iterator,
getNode)
assert.Assert(t, alloc00 != nil, "alloc00 expected")
- alloc01 :=
app0.tryAllocate(resources.NewResourceFromMap(map[string]resources.Quantity{"first":
39}), 30*time.Second, &preemptionAttemptsRemaining, iterator, iterator,
getNode)
+ alloc01 :=
app0.tryAllocate(resources.NewResourceFromMap(map[string]resources.Quantity{"first":
29}), 30*time.Second, &preemptionAttemptsRemaining, iterator, iterator,
getNode)
Review Comment:
The first allocation ask is 11, so we need to 40 - 11 = 29
--
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]