mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-08 00:55:37 +00:00
Add a timeout to waitForPodRunning
* Add a timeout, convert the function to return an error (which gives a reasonable status message for callers). * Start converting glog to By.
This commit is contained in:
@@ -123,7 +123,11 @@ func TestBasicImage(c *client.Client, test string, image string) bool {
|
||||
// Wait for the pods to enter the running state. Waiting loops until the pods
|
||||
// are running so non-running pods cause a timeout for this test.
|
||||
for _, pod := range pods.Items {
|
||||
waitForPodRunning(c, pod.Name)
|
||||
err = waitForPodRunning(c, pod.Name, 300*time.Second)
|
||||
if err != nil {
|
||||
glog.Errorf("waitForPodRunningFailed: %v", err.Error())
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// Try to make sure we get a hostIP for each pod.
|
||||
|
||||
Reference in New Issue
Block a user