diff --git a/test/e2e/framework/pod/wait.go b/test/e2e/framework/pod/wait.go index 20ac0d11ed0..335ee96e0cf 100644 --- a/test/e2e/framework/pod/wait.go +++ b/test/e2e/framework/pod/wait.go @@ -591,12 +591,6 @@ func WaitForPodsWithLabelRunningReady(c clientset.Interface, ns string, label la return WaitForAllPodsCondition(c, ns, opts, 1, "running and ready", podListTimeout, testutils.PodRunningReady) } -// WaitForPodsWithListOptionsRunningReady waits for exact amount of matching pods as per list options to become running and ready. -// Return the list of matching pods. -func WaitForPodsWithListOptionsRunningReady(c clientset.Interface, opts metav1.ListOptions, ns string, minPod int) (pods *v1.PodList, err error) { - return WaitForAllPodsCondition(c, ns, opts, minPod, "running and ready", podListTimeout, testutils.PodRunningReady) -} - // WaitForNRestartablePods tries to list restarting pods using ps until it finds expect of them, // returning their names if it can do so before timeout. func WaitForNRestartablePods(ps *testutils.PodStore, expect int, timeout time.Duration) ([]string, error) { diff --git a/test/e2e/storage/non_graceful_node_shutdown.go b/test/e2e/storage/non_graceful_node_shutdown.go index 69655d6a9e7..558377d5a0d 100644 --- a/test/e2e/storage/non_graceful_node_shutdown.go +++ b/test/e2e/storage/non_graceful_node_shutdown.go @@ -35,6 +35,7 @@ import ( "k8s.io/kubernetes/test/e2e/storage/drivers" storageframework "k8s.io/kubernetes/test/e2e/storage/framework" "k8s.io/kubernetes/test/e2e/storage/utils" + testutils "k8s.io/kubernetes/test/utils" imageutils "k8s.io/kubernetes/test/utils/image" admissionapi "k8s.io/pod-security-admission/api" ) @@ -117,7 +118,7 @@ var _ = utils.SIGDescribe("[Feature:NodeOutOfServiceVolumeDetach] [Disruptive] [ LabelSelector: labelSelectorStr, FieldSelector: fields.OneTermNotEqualSelector("spec.nodeName", oldNodeName).String(), } - _, err = e2epod.WaitForPodsWithListOptionsRunningReady(c, podListOpts, ns, 1) + _, err = e2epod.WaitForAllPodsCondition(c, ns, podListOpts, 1, "running and ready", framework.PodListTimeout, testutils.PodRunningReady) framework.ExpectNoError(err) // Bring the node back online and remove the taint