Commit 126a0667 authored by hangaoshuai's avatar hangaoshuai

fix todo:Get rid of this duplicate function IsRetryableAPIError in favour of the one in test/utils

parent 07240b71
......@@ -1305,7 +1305,7 @@ func (j *IngressTestJig) WaitForIngressAddress(c clientset.Interface, ns, ingNam
ipOrNameList, err := getIngressAddress(c, ns, ingName, j.Class)
if err != nil || len(ipOrNameList) == 0 {
j.Logger.Errorf("Waiting for Ingress %v to acquire IP, error %v", ingName, err)
if IsRetryableAPIError(err) {
if testutils.IsRetryableAPIError(err) {
return false, nil
}
return false, err
......
......@@ -670,7 +670,7 @@ func scaleResource(wg *sync.WaitGroup, config testutils.RunObjectConfig, scaling
return true, nil
}
framework.Logf("Failed to list pods from %v %v due to: %v", config.GetKind(), config.GetName(), err)
if framework.IsRetryableAPIError(err) {
if testutils.IsRetryableAPIError(err) {
return false, nil
}
return false, fmt.Errorf("Failed to list pods from %v %v with non-retriable error: %v", config.GetKind(), config.GetName(), err)
......
......@@ -76,7 +76,7 @@ func (p *IntegrationTestNodePreparer) PrepareNodes() error {
var err error
for retry := 0; retry < retries; retry++ {
_, err = p.client.CoreV1().Nodes().Create(baseNode)
if err == nil || !e2eframework.IsRetryableAPIError(err) {
if err == nil || !testutils.IsRetryableAPIError(err) {
break
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment