From ca339a090cd0c93f75b4a4669f2b813852aa2e9d Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sat, 6 Aug 2022 20:52:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E5=A4=84=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_client_pool_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/nodes/http_client_pool_test.go b/internal/nodes/http_client_pool_test.go index 7e19f7e..bbac14f 100644 --- a/internal/nodes/http_client_pool_test.go +++ b/internal/nodes/http_client_pool_test.go @@ -38,7 +38,7 @@ func TestHTTPClientPool_Client(t *testing.T) { } func TestHTTPClientPool_cleanClients(t *testing.T) { - origin := &serverconfigs.OriginConfig{ + var origin = &serverconfigs.OriginConfig{ Id: 1, Version: 2, Addr: &serverconfigs.NetworkAddressConfig{Host: "127.0.0.1", PortRange: "1234"}, @@ -48,8 +48,7 @@ func TestHTTPClientPool_cleanClients(t *testing.T) { t.Fatal(err) } - pool := NewHTTPClientPool() - pool.clientExpiredDuration = 2 * time.Second + var pool = NewHTTPClientPool() for i := 0; i < 10; i++ { t.Log("get", i)