This is an automated email from the ASF dual-hosted git repository.
mani pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-core.git
The following commit(s) were added to refs/heads/master by this push:
new 1178b234 [YUNIKORN-1946] Flaky test TestPlaceholderAllocationTracking
(#630)
1178b234 is described below
commit 1178b2349c8f8a9cb78540aeab23c2037176e0f3
Author: Peter Bacsko <[email protected]>
AuthorDate: Thu Aug 31 16:57:17 2023 +0530
[YUNIKORN-1946] Flaky test TestPlaceholderAllocationTracking (#630)
Closes: #630
Signed-off-by: Manikandan R <[email protected]>
---
pkg/scheduler/partition_test.go | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/pkg/scheduler/partition_test.go b/pkg/scheduler/partition_test.go
index 9005929d..8f81d88f 100644
--- a/pkg/scheduler/partition_test.go
+++ b/pkg/scheduler/partition_test.go
@@ -3687,19 +3687,20 @@ func TestPlaceholderAllocationTracking(t *testing.T) {
ask3 := newAllocationAskTG(allocID, appID1, taskGroup, res, false)
err = app.AddAllocationAsk(ask3)
assert.NilError(t, err, "failed to add ask to app")
- alloc = partition.tryPlaceholderAllocate()
- assert.Assert(t, alloc != nil, "ask should have been allocated")
+ ask4 := newAllocationAskTG(allocID2, appID1, taskGroup, res, false)
+ err = app.AddAllocationAsk(ask4)
+ assert.NilError(t, err, "failed to add ask to app")
+ alloc1 := partition.tryPlaceholderAllocate()
+ assert.Assert(t, alloc1 != nil, "ask should have been allocated")
+ alloc2 := partition.tryPlaceholderAllocate()
+ assert.Assert(t, alloc2 != nil, "ask should have been allocated")
+
partition.removeAllocation(&si.AllocationRelease{
UUID: ph1uuid,
ApplicationID: appID1,
TerminationType: si.TerminationType_PLACEHOLDER_REPLACED,
})
assert.Equal(t, 1, partition.getPhAllocationCount())
- ask4 := newAllocationAskTG(allocID2, appID1, taskGroup, res, false)
- err = app.AddAllocationAsk(ask4)
- assert.NilError(t, err, "failed to add ask to app")
- alloc = partition.tryPlaceholderAllocate()
- assert.Assert(t, alloc != nil, "ask should have been allocated")
partition.removeAllocation(&si.AllocationRelease{
UUID: ph2uuid,
ApplicationID: appID1,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]