mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
refactor: use controller.FilterActivePods in framework e2e test
This commit is contained in:
parent
8865cb3c24
commit
83e0d99614
@ -566,13 +566,7 @@ func WaitForPodsInactive(ps *testutils.PodStore, interval, timeout time.Duration
|
|||||||
var activePods []*v1.Pod
|
var activePods []*v1.Pod
|
||||||
err := wait.PollImmediate(interval, timeout, func() (bool, error) {
|
err := wait.PollImmediate(interval, timeout, func() (bool, error) {
|
||||||
pods := ps.List()
|
pods := ps.List()
|
||||||
activePods = nil
|
activePods = controller.FilterActivePods(pods)
|
||||||
for _, pod := range pods {
|
|
||||||
if controller.IsPodActive(pod) {
|
|
||||||
activePods = append(activePods, pod)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(activePods) != 0 {
|
if len(activePods) != 0 {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user