summaryrefslogtreecommitdiff
path: root/client/httpclient_test.go
diff options
context:
space:
mode:
authorSteve Azzopardi <sazzopardi@gitlab.com>2023-01-30 09:21:17 +0100
committerSteve Azzopardi <sazzopardi@gitlab.com>2023-01-30 09:54:42 +0100
commit80f684e48eca2bf1ef2006d84f8c49bec7104344 (patch)
treed96c92030bfe86a5183a7268361b2ec70788f73c /client/httpclient_test.go
parent51eab44edafd0c097e82c1a74fd379cae4869a42 (diff)
downloadgitlab-shell-80f684e48eca2bf1ef2006d84f8c49bec7104344.tar.gz
feat: make retryable http default client
What --- Make the retryableHTTP client introduced in https://gitlab.com/gitlab-org/gitlab-shell/-/merge_requests/703 the default HTTP client. Why --- In https://gitlab.com/gitlab-com/gl-infra/production/-/issues/7979#note_1254964426 we've seen a 99% error reduction on `git` commands from `gitlab-shell` when the retryableHTTP client is used. This has been running in production for over 2 weeks in `us-east1-b` and 5 days fleet-wide so we should be confident that this client works as expected. Reference: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/7979 Signed-off-by: Steve Azzopardi <sazzopardi@gitlab.com>
Diffstat (limited to 'client/httpclient_test.go')
-rw-r--r--client/httpclient_test.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/client/httpclient_test.go b/client/httpclient_test.go
index ee2c6fd..b893853 100644
--- a/client/httpclient_test.go
+++ b/client/httpclient_test.go
@@ -21,13 +21,7 @@ func TestReadTimeout(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, client)
- if client.HTTPClient != nil {
- require.Equal(t, time.Duration(expectedSeconds)*time.Second, client.HTTPClient.Timeout)
- }
-
- if client.RetryableHTTP != nil {
- require.Equal(t, time.Duration(expectedSeconds)*time.Second, client.RetryableHTTP.HTTPClient.Timeout)
- }
+ require.Equal(t, time.Duration(expectedSeconds)*time.Second, client.RetryableHTTP.HTTPClient.Timeout)
}
const (