diff options
Diffstat (limited to 'extras/hs-test/infra/utils.go')
-rw-r--r-- | extras/hs-test/infra/utils.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extras/hs-test/infra/utils.go b/extras/hs-test/infra/utils.go index ee528370280..a32acb30193 100644 --- a/extras/hs-test/infra/utils.go +++ b/extras/hs-test/infra/utils.go @@ -86,13 +86,13 @@ func (s *Stanza) SaveToFile(fileName string) error { } // NewHttpClient creates [http.Client] with disabled proxy and redirects, it also sets timeout to 30seconds. -func NewHttpClient() *http.Client { +func NewHttpClient(timeout time.Duration) *http.Client { transport := http.DefaultTransport transport.(*http.Transport).Proxy = nil transport.(*http.Transport).DisableKeepAlives = true client := &http.Client{ Transport: transport, - Timeout: time.Second * 30, + Timeout: timeout, CheckRedirect: func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse }} |