Skip to content

Commit

Permalink
internal/discovery: fixing broken retry-after duration test case
Browse files Browse the repository at this point in the history
Signed-off-by: xinau <[email protected]>
  • Loading branch information
xinau committed Dec 9, 2020
1 parent dcf9a36 commit d802837
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/discovery/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,5 @@ func GetRetryAfter(resp *http.Response) (time.Duration, bool) {
if err != nil {
return 0, false
}
return time.Second * time.Duration(after + 1), true
return time.Second * time.Duration(after+1), true
}
2 changes: 1 addition & 1 deletion internal/discovery/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func TestGetRetryAfter(t *testing.T) {
&http.Response{Header: map[string][]string{
"Retry-After": []string{"3600"},
}},
time.Second * 3600, true,
time.Second * 3601, true,
}, "malformed header": {
&http.Response{Header: map[string][]string{
"Retry-After": []string{"malformed"},
Expand Down

0 comments on commit d802837

Please sign in to comment.