From 1ba53ad68c95d00561a99b0b4726d90143014b3f Mon Sep 17 00:00:00 2001 From: Amir Alavi Date: Mon, 20 Sep 2021 18:18:47 -0400 Subject: [PATCH] e2e TestTopologySpreadConstraint: ensure pods are running before checking for topology spread across domains --- test/e2e/e2e_topologyspreadconstraint_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/e2e/e2e_topologyspreadconstraint_test.go b/test/e2e/e2e_topologyspreadconstraint_test.go index ad814e027..efbb6bef9 100644 --- a/test/e2e/e2e_topologyspreadconstraint_test.go +++ b/test/e2e/e2e_topologyspreadconstraint_test.go @@ -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)