From 28f1d48bb4184d535cc570d25d1e07ae68151355 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Wed, 19 Oct 2016 11:34:05 -0400 Subject: [PATCH] Set done to true & return error if RestartPolicy not Always --- test/e2e/framework/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index a41b317ec9f..8a959facc88 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -1313,7 +1313,7 @@ func waitForPodTerminatedInNamespace(c *client.Client, podName, reason, namespac func waitForPodSuccessInNamespaceTimeout(c *client.Client, podName string, namespace string, timeout time.Duration) error { return waitForPodCondition(c, namespace, podName, "success or failure", timeout, func(pod *api.Pod) (bool, error) { if pod.Spec.RestartPolicy == api.RestartPolicyAlways { - return false, fmt.Errorf("pod %q will never terminate with a succeeded state since its restart policy is Always", podName) + return true, fmt.Errorf("pod %q will never terminate with a succeeded state since its restart policy is Always", podName) } switch pod.Status.Phase { case api.PodSucceeded: