From fa5defdc2d7f674b2a9a68030bf2af993c42ad01 Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Wed, 2 Oct 2024 09:00:19 +0200 Subject: hs-test: prom consecutive connections test Type: test Change-Id: Ide4571dd8ac9bcb64fcd5ba408b6d1f99d34185f Signed-off-by: Matus Fabian --- extras/hs-test/infra/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extras/hs-test/infra/utils.go') 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 }} -- cgit