Skip to content

Commit 01c9d28

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 01c9d28

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/e2e/node/pods.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ var _ = SIGDescribe("Pods Extended", func() {
324324
},
325325
Resources: v1.ResourceRequirements{
326326
Limits: v1.ResourceList{
327-
"ephemeral-storage": resource.MustParse("5Mi"),
327+
"ephemeral-storage": resource.MustParse("3Mi"),
328328
},
329329
}},
330330
},
@@ -338,7 +338,16 @@ 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 timeout is 5m, and the ephemeral storage
348+
// is expected to live for 3m, this should give us some
349+
// buffer for the test to withstand a flaky environment
350+
err = e2epod.WaitForPodTerminatedInNamespace(ctx, f.ClientSet, pod.Name, "Evicted", f.Namespace.Name)
342351
if err != nil {
343352
framework.Failf("error waiting for pod to be evicted: %v", err)
344353
}

0 commit comments

Comments
 (0)