mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
Merge pull request #8896 from lavalamp/e2e-timeout
Give up waiting for failed pods + print status
This commit is contained in:
commit
eabc65149e
@ -238,7 +238,13 @@ func createTestingNS(baseName string, c *client.Client) (*api.Namespace, error)
|
|||||||
|
|
||||||
func waitForPodRunningInNamespace(c *client.Client, podName string, namespace string) error {
|
func waitForPodRunningInNamespace(c *client.Client, podName string, namespace string) error {
|
||||||
return waitForPodCondition(c, namespace, podName, "running", podPoll, podStartTimeout, func(pod *api.Pod) (bool, error) {
|
return waitForPodCondition(c, namespace, podName, "running", podPoll, podStartTimeout, func(pod *api.Pod) (bool, error) {
|
||||||
return (pod.Status.Phase == api.PodRunning), nil
|
if pod.Status.Phase == api.PodRunning {
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
if pod.Status.Phase == api.PodFailed {
|
||||||
|
return true, fmt.Errorf("Giving up; pod went into failed status: \n%#v", pod.Status)
|
||||||
|
}
|
||||||
|
return false, nil
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user