Răsfoiți Sursa

Be a little more generous with HTTP timeouts

Jakob Borg 11 ani în urmă
părinte
comite
5a46cf1d48
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      test/httpstress_test.go

+ 3 - 3
test/httpstress_test.go

@@ -53,12 +53,12 @@ func TestStressHTTP(t *testing.T) {
 	tr := &http.Transport{
 		TLSClientConfig:       tc,
 		DisableKeepAlives:     true,
-		ResponseHeaderTimeout: time.Second,
-		TLSHandshakeTimeout:   time.Second,
+		ResponseHeaderTimeout: 10 * time.Second,
+		TLSHandshakeTimeout:   10 * time.Second,
 	}
 	client := &http.Client{
 		Transport: tr,
-		Timeout:   2 * time.Second,
+		Timeout:   10 * time.Second,
 	}
 	var wg sync.WaitGroup
 	t0 := time.Now()