Unverified Commit 875f8c30 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #60557 from hanxiaoshuai/fixtodo0228

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix todo:Get rid of this duplicate function IsRetryableAPIError in favour of the one in test/utils **What this PR does / why we need it**: fix todo:Get rid of this duplicate function IsRetryableAPIError in favour of the one in test/utils **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents b92807f9 126a0667
......@@ -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