Skip to content

Commit d802837

Browse files
author
xinau
committed
internal/discovery: fixing broken retry-after duration test case
Signed-off-by: xinau <felix.ehrenpfort@codecentric.cloud>
1 parent dcf9a36 commit d802837

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/discovery/client/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,5 @@ func GetRetryAfter(resp *http.Response) (time.Duration, bool) {
153153
if err != nil {
154154
return 0, false
155155
}
156-
return time.Second * time.Duration(after + 1), true
156+
return time.Second * time.Duration(after+1), true
157157
}

internal/discovery/client/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ func TestGetRetryAfter(t *testing.T) {
189189
&http.Response{Header: map[string][]string{
190190
"Retry-After": []string{"3600"},
191191
}},
192-
time.Second * 3600, true,
192+
time.Second * 3601, true,
193193
}, "malformed header": {
194194
&http.Response{Header: map[string][]string{
195195
"Retry-After": []string{"malformed"},

0 commit comments

Comments
 (0)