1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-25 20:59:28 +01:00

e2e TestTopologySpreadConstraint: ensure pods are running before checking for topology spread across domains

This commit is contained in:
Amir Alavi
2021-09-20 18:18:47 -04:00
parent 27fec39c65
commit 8e1da96082

View File

@@ -119,6 +119,9 @@ func TestTopologySpreadConstraint(t *testing.T) {
t.Fatalf("Pods were not evicted for %s TopologySpreadConstraint", name)
}
// Ensure recently evicted Pod are rescheduled and running before asserting for a balanced topology spread
waitForRCPodsRunning(ctx, t, clientSet, rc)
pods, err := clientSet.CoreV1().Pods(testNamespace.Name).List(ctx, metav1.ListOptions{LabelSelector: fmt.Sprintf("%s=%s", tc.labelKey, tc.labelValue)})
if err != nil {
t.Errorf("Error listing pods for %s: %v", name, err)