Skip to content

Commit 99c2e74

Browse files
author
Kenichi Omichi
committed
Add debugging message to know the pod status
The log of a flake test says "Pod did not start running: timed out waiting for the condition" but it is hard to know what is actual status of the pod. So this adds debugging message to know that.
1 parent a1364be commit 99c2e74

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/e2e/framework/pod/resource.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,13 @@ func podRunningAndReady(c clientset.Interface, podName, namespace string) wait.C
184184
}
185185
switch pod.Status.Phase {
186186
case v1.PodFailed, v1.PodSucceeded:
187+
e2elog.Logf("The status of Pod %s is %s which is unexpected", podName, pod.Status.Phase)
187188
return false, conditions.ErrPodCompleted
188189
case v1.PodRunning:
190+
e2elog.Logf("The status of Pod %s is %s (Ready = %v)", podName, pod.Status.Phase, podutil.IsPodReady(pod))
189191
return podutil.IsPodReady(pod), nil
190192
}
193+
e2elog.Logf("The status of Pod %s is %s, waiting for it to be Running (with Ready = true)", podName, pod.Status.Phase)
191194
return false, nil
192195
}
193196
}

0 commit comments

Comments
 (0)