Commit Graph

7 Commits

Author SHA1 Message Date
David Porter
efc9e73266 test: Fix e2e_node restart_test flake
In the `should correctly account for terminated pods after restart`, the
test first creates a set of `restartNever` pods, followed by a set of
`restartAlways` pods. Both the `restartNever` and `restartAlways` pods
request an entire CPU. As a result, the `restartAlways` pods will not be
admitted, if the `restartNever` pods did not terminate yet.

Depending on the timing/how fast the pods terminate, the test can pass
sometimes fail which results in flakes. To de-flake the test, the test
should wait until the `restartNever` pods enter a terminal `Succeeded`
phase, before creating the `restartAlways` pods.

To do this, generalize the function `waitForPods` to accept a pod
condition (`testutils.PodRunningReadyOrSucceeded`, or
`testutils.PodSucceeded`). Also introduce a new "Succeeded" pod
condition, so the test can explicitly wait until the pods enter the
Succeeded phase.

Signed-off-by: David Porter <david@porter.me>
2022-10-21 17:14:56 -07:00
tanshanshan
65b59474dc fix-todo 2017-09-25 15:42:21 +08:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Chao Xu
4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Chao Xu
068a7eb415 test/utils 2016-11-23 15:53:09 -08:00
bprashanth
37bc34c567 periodically GC pod ips 2016-10-27 22:15:35 -07:00
gmarek
7681a1bdff Move RunRC-like functions to test/utils 2016-10-12 15:06:56 +02:00