Expose a pending pods summary in scheudler's dummper output

This commit is contained in:
Wei Huang
2022-08-05 18:30:09 -07:00
parent 64ed914545
commit 7df9bfcfef
7 changed files with 30 additions and 17 deletions

View File

@@ -88,7 +88,8 @@ func TestCoreResourceEnqueue(t *testing.T) {
// Wait for the three pods to be present in the scheduling queue.
if err := wait.Poll(time.Millisecond*200, wait.ForeverTestTimeout, func() (bool, error) {
return len(testCtx.Scheduler.SchedulingQueue.PendingPods()) == 3, nil
pendingPods, _ := testCtx.Scheduler.SchedulingQueue.PendingPods()
return len(pendingPods) == 3, nil
}); err != nil {
t.Fatal(err)
}
@@ -263,7 +264,8 @@ func TestCustomResourceEnqueue(t *testing.T) {
// Wait for the testing Pod to be present in the scheduling queue.
if err := wait.Poll(time.Millisecond*200, wait.ForeverTestTimeout, func() (bool, error) {
return len(testCtx.Scheduler.SchedulingQueue.PendingPods()) == 1, nil
pendingPods, _ := testCtx.Scheduler.SchedulingQueue.PendingPods()
return len(pendingPods) == 1, nil
}); err != nil {
t.Fatal(err)
}