Skip to content

Commit f08ef5f

Browse files
committed
remove retry of Out of capacity error
1 parent 0da6a1a commit f08ef5f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

oci/retry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func getDefaultExpectedRetryDuration(response oci_common.OCIOperationResponse, d
139139
defaultRetryTime = longRetryTime
140140
case 500:
141141
if e != nil && (strings.Contains(e.Error(), "Out of host capacity")) {
142-
return defaultRetryTime
142+
return 0
143143
}
144144
if configuredRetryDuration != nil {
145145
return *configuredRetryDuration

oci/retry_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func TestUnitRetryLoop_outOfCapacity(t *testing.T) {
130130
httpResponseStatusCode: 500,
131131
header: map[string][]string{},
132132
responseError: fmt.Errorf("Out of host capacity. "),
133-
expectedRetryTimeSeconds: 15,
133+
expectedRetryTimeSeconds: 0,
134134
jitterMode: true,
135135
}
136136
retryLoop(t, &r)

0 commit comments

Comments
 (0)