refactor: use controller.FilterActivePods in framework e2e test

This commit is contained in:
draveness 2019-07-01 18:12:02 +08:00
parent 8865cb3c24
commit 83e0d99614

View File

@ -566,13 +566,7 @@ func WaitForPodsInactive(ps *testutils.PodStore, interval, timeout time.Duration
var activePods []*v1.Pod
err := wait.PollImmediate(interval, timeout, func() (bool, error) {
pods := ps.List()
activePods = nil
for _, pod := range pods {
if controller.IsPodActive(pod) {
activePods = append(activePods, pod)
}
}
activePods = controller.FilterActivePods(pods)
if len(activePods) != 0 {
return false, nil
}