re-use remote transports in Peer,Storage,Locker clients (#10788)

use one transport for internode communication
This commit is contained in:
Harshavardhana
2020-11-02 07:43:11 -08:00
committed by GitHub
parent d8e07f2c41
commit 4c773f7068
12 changed files with 31 additions and 67 deletions
+4
View File
@@ -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()