From 9b6590e7ae72050e62c2043c0e9949d9a74f77f4 Mon Sep 17 00:00:00 2001 From: Marcin Owsiany Date: Wed, 15 Nov 2017 11:29:52 +0100 Subject: [PATCH] Improve messages around waiting for pods. --- test/e2e/framework/util.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index bddeeeb3637..630ece80f4f 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -593,6 +593,7 @@ func WaitForPodsRunningReady(c clientset.Interface, ns string, minPods, allowedN var ignoreNotReady bool badPods := []v1.Pod{} desiredPods := 0 + notReady := int32(0) if wait.PollImmediate(Poll, timeout, func() (bool, error) { // We get the new list of pods, replication controllers, and @@ -636,7 +637,7 @@ func WaitForPodsRunningReady(c clientset.Interface, ns string, minPods, allowedN return false, err } nOk := int32(0) - notReady := int32(0) + notReady = int32(0) badPods = []v1.Pod{} desiredPods = len(podList.Items) for _, pod := range podList.Items { @@ -679,7 +680,7 @@ func WaitForPodsRunningReady(c clientset.Interface, ns string, minPods, allowedN if !ignoreNotReady { return errors.New(errorBadPodsStates(badPods, desiredPods, ns, "RUNNING and READY", timeout)) } - Logf("Number of not-ready pods is allowed.") + Logf("Number of not-ready pods (%d) is below the allowed threshold (%d).", notReady, allowedNotReadyPods) } return nil }