mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
fix: connection keep alive
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
@@ -23,9 +24,14 @@ func Run(t *testing.T, testcases ...ITestCase) error {
|
|||||||
|
|
||||||
func NewRunner() *Runner {
|
func NewRunner() *Runner {
|
||||||
return &Runner{
|
return &Runner{
|
||||||
t: &testing.T{},
|
t: &testing.T{},
|
||||||
debug: false, // default to turn off debug
|
debug: false, // default to turn off debug
|
||||||
client: &http.Client{},
|
client: &http.Client{
|
||||||
|
Transport: &http.Transport{
|
||||||
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||||
|
},
|
||||||
|
Timeout: 30 * time.Second,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user