Skip to content

Commit 40b6aed

Browse files
committed
UPSTREAM: <carry>: improve flakiness in evicted pod test
If this proves useful, we can try to push it upstream
1 parent 050f9ab commit 40b6aed

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/e2e/node/pods.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,14 @@ var _ = SIGDescribe("Pods Extended", func() {
338338
return podClient.Delete(ctx, pod.Name, metav1.DeleteOptions{})
339339
})
340340

341-
err := e2epod.WaitForPodTerminatedInNamespace(ctx, f.ClientSet, pod.Name, "Evicted", f.Namespace.Name)
341+
ginkgo.By("waiting for pod to be running")
342+
err := e2epod.WaitForPodRunningInNamespace(ctx, f.ClientSet, pod)
343+
if err != nil {
344+
framework.Failf("error waiting for pod to be running: %v", err)
345+
}
346+
347+
// the defualt wait timeout in effect is 5m
348+
err = e2epod.WaitForPodTerminatedInNamespace(ctx, f.ClientSet, pod.Name, "Evicted", f.Namespace.Name)
342349
if err != nil {
343350
framework.Failf("error waiting for pod to be evicted: %v", err)
344351
}

0 commit comments

Comments
 (0)