chore: remove strict timeout restrictions in test for slow github action

This commit is contained in:
wwqgtxx
2026-04-16 10:02:34 +08:00
parent 83ac220f54
commit e0a42d4e07
+8 -8
View File
@@ -186,11 +186,11 @@ func NewHttpTestTunnel() *TestTunnel {
DialContext: func(context.Context, string, string) (net.Conn, error) {
return instance, nil
},
// from http.DefaultTransport
MaxIdleConns: 100,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
//// from http.DefaultTransport
//MaxIdleConns: 100,
//IdleConnTimeout: 90 * time.Second,
//TLSHandshakeTimeout: 10 * time.Second,
//ExpectContinueTimeout: 1 * time.Second,
// for our self-signed cert
TLSClientConfig: tlsClientConfig.Clone(),
// open http2
@@ -198,7 +198,7 @@ func NewHttpTestTunnel() *TestTunnel {
}
client := http.Client{
Timeout: 30 * time.Second,
Timeout: 60 * time.Second,
Transport: transport,
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
@@ -284,8 +284,8 @@ func NewHttpTestTunnel() *TestTunnel {
return
}
}
ctx, cancel := context.WithTimeout(ctx, C.DefaultTLSTimeout)
defer cancel()
//ctx, cancel := context.WithTimeout(ctx, C.DefaultTLSTimeout)
//defer cancel()
if err := tlsConn.HandshakeContext(ctx); err != nil {
return
}