We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0ba4d88 + 262239d commit a44d027Copy full SHA for a44d027
test/e2e/scheduler_predicates.go
@@ -132,6 +132,14 @@ func waitForStableCluster(c *client.Client) int {
132
133
allPods, err := c.Pods(api.NamespaceAll).List(api.ListOptions{})
134
framework.ExpectNoError(err)
135
+ // API server returns also Pods that succeeded. We need to filter them out.
136
+ currentPods := make([]api.Pod, 0, len(allPods.Items))
137
+ for _, pod := range allPods.Items {
138
+ if pod.Status.Phase != api.PodSucceeded && pod.Status.Phase != api.PodFailed {
139
+ currentPods = append(currentPods, pod)
140
+ }
141
142
+ allPods.Items = currentPods
143
scheduledPods, currentlyNotScheduledPods := getPodsScheduled(allPods)
144
for len(currentlyNotScheduledPods) != 0 {
145
time.Sleep(2 * time.Second)
0 commit comments