mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #35984 from zmerlynn/make-disruption-less-flakey
Automatic merge from submit-queue Disruption e2e: wait for running pods in the table test, too **What this PR does / why we need it**: Makes the `DisruptionController` tests less flaky. **Which issue this PR fixes**: fixes #34032
This commit is contained in:
commit
33c1c93863
@ -163,6 +163,11 @@ var _ = framework.KubeDescribe("DisruptionController", func() {
|
|||||||
err = cs.Pods(ns).Evict(e)
|
err = cs.Pods(ns).Evict(e)
|
||||||
Expect(err).Should(MatchError("Cannot evict pod as it would violate the pod's disruption budget."))
|
Expect(err).Should(MatchError("Cannot evict pod as it would violate the pod's disruption budget."))
|
||||||
} else {
|
} else {
|
||||||
|
// Only wait for running pods in the "allow" case
|
||||||
|
// because one of shouldDeny cases relies on the
|
||||||
|
// replicaSet not fitting on the cluster.
|
||||||
|
waitForPodsOrDie(cs, ns, c.podCount+int(c.replicaSetSize))
|
||||||
|
|
||||||
// Since disruptionAllowed starts out false, if an eviction is ever allowed,
|
// Since disruptionAllowed starts out false, if an eviction is ever allowed,
|
||||||
// that means the controller is working.
|
// that means the controller is working.
|
||||||
err = wait.PollImmediate(framework.Poll, timeout, func() (bool, error) {
|
err = wait.PollImmediate(framework.Poll, timeout, func() (bool, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user