From 54b0ed45b76a07edbcd986695bc878cad99d483a Mon Sep 17 00:00:00 2001 From: dom4ha Date: Thu, 26 Sep 2024 09:15:54 +0000 Subject: [PATCH] Add one more check to the test case precondition assessment. --- test/integration/scheduler/queue_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/integration/scheduler/queue_test.go b/test/integration/scheduler/queue_test.go index fe896595b06..8b0f09f368e 100644 --- a/test/integration/scheduler/queue_test.go +++ b/test/integration/scheduler/queue_test.go @@ -956,7 +956,8 @@ func TestCoreResourceEnqueue(t *testing.T) { // Wait for the tt.pods to be present in the scheduling active queue. if err := wait.PollUntilContextTimeout(ctx, time.Millisecond*200, wait.ForeverTestTimeout, false, func(ctx context.Context) (bool, error) { - return len(testCtx.Scheduler.SchedulingQueue.PodsInActiveQ()) == len(tt.pods), nil + pendingPods, _ := testCtx.Scheduler.SchedulingQueue.PendingPods() + return len(pendingPods) == len(tt.pods) && len(testCtx.Scheduler.SchedulingQueue.PodsInActiveQ()) == len(tt.pods), nil }); err != nil { t.Fatal(err) }