Wait for only enough no. of RC replicas to be running in testutil

This commit is contained in:
Shyam Jeedigunta
2018-03-19 13:44:31 +01:00
parent ebae09e741
commit e5dc6c88eb
2 changed files with 18 additions and 5 deletions

View File

@@ -2811,7 +2811,11 @@ func WaitForControlledPodsRunning(c clientset.Interface, ns, name string, kind s
if err != nil {
return err
}
err = testutils.WaitForPodsWithLabelRunning(c, ns, selector)
replicas, err := getReplicasFromRuntimeObject(rtObject)
if err != nil {
return err
}
err = testutils.WaitForEnoughPodsWithLabelRunning(c, ns, selector, int(replicas))
if err != nil {
return fmt.Errorf("Error while waiting for replication controller %s pods to be running: %v", name, err)
}