瀏覽代碼

Slightly more robust HTTP stress test

Jakob Borg 11 年之前
父節點
當前提交
7d1c720b84
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      test/httpstress_test.go

+ 4 - 1
test/httpstress_test.go

@@ -51,7 +51,10 @@ func TestStressHTTP(t *testing.T) {
 
 	tc := &tls.Config{InsecureSkipVerify: true}
 	tr := &http.Transport{
-		TLSClientConfig: tc,
+		TLSClientConfig:       tc,
+		DisableKeepAlives:     true,
+		ResponseHeaderTimeout: time.Second,
+		TLSHandshakeTimeout:   time.Second,
 	}
 	client := &http.Client{
 		Transport: tr,