From 83e0d9961465ffe79634c2b704453fb68bc0591e Mon Sep 17 00:00:00 2001 From: draveness Date: Mon, 1 Jul 2019 18:12:02 +0800 Subject: [PATCH] refactor: use controller.FilterActivePods in framework e2e test --- test/e2e/framework/pod/wait.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/e2e/framework/pod/wait.go b/test/e2e/framework/pod/wait.go index 5b63418c8de..8650f763cdf 100644 --- a/test/e2e/framework/pod/wait.go +++ b/test/e2e/framework/pod/wait.go @@ -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 }