mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 18:27:49 +00:00
Expose a pending pods summary in scheudler's dummper output
This commit is contained in:
@@ -1713,9 +1713,9 @@ func TestUnschedulablePodBecomesSchedulable(t *testing.T) {
|
||||
t.Errorf("Pod %v was not scheduled: %v", pod.Name, err)
|
||||
}
|
||||
// Make sure pending queue is empty.
|
||||
pendingPods := len(testCtx.Scheduler.SchedulingQueue.PendingPods())
|
||||
if pendingPods != 0 {
|
||||
t.Errorf("pending pods queue is not empty, size is: %d", pendingPods)
|
||||
pendingPods, s := testCtx.Scheduler.SchedulingQueue.PendingPods()
|
||||
if len(pendingPods) != 0 {
|
||||
t.Errorf("pending pods queue is not empty, size is: %d, summary is: %s", len(pendingPods), s)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user