mirror of
https://github.com/pgsty/minio.git
synced 2026-07-21 05:00:22 +03:00
re-use remote transports in Peer,Storage,Locker clients (#10788)
use one transport for internode communication
This commit is contained in:
@@ -61,6 +61,7 @@ import (
|
||||
"github.com/minio/minio/cmd/crypto"
|
||||
xhttp "github.com/minio/minio/cmd/http"
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
"github.com/minio/minio/cmd/rest"
|
||||
"github.com/minio/minio/pkg/auth"
|
||||
"github.com/minio/minio/pkg/bucket/policy"
|
||||
"github.com/minio/minio/pkg/hash"
|
||||
@@ -69,6 +70,7 @@ import (
|
||||
// TestMain to set up global env.
|
||||
func TestMain(m *testing.M) {
|
||||
flag.Parse()
|
||||
|
||||
globalActiveCred = auth.Credentials{
|
||||
AccessKey: auth.DefaultAccessKey,
|
||||
SecretKey: auth.DefaultSecretKey,
|
||||
@@ -107,6 +109,8 @@ func TestMain(m *testing.M) {
|
||||
|
||||
globalDNSCache = xhttp.NewDNSCache(3*time.Second, 10*time.Second)
|
||||
|
||||
globalInternodeTransport = newInternodeHTTPTransport(nil, rest.DefaultTimeout)()
|
||||
|
||||
initHelp()
|
||||
|
||||
resetTestGlobals()
|
||||
|
||||
Reference in New Issue
Block a user