From c37c273e27bf8172c1164f842989bb3cebbd1233 Mon Sep 17 00:00:00 2001 From: Xin Hao Date: Fri, 30 Aug 2024 11:40:20 +0800 Subject: [PATCH] change docker-compose to docker compose change SessionPool's List as List ref remove unused tz field in the SessionPool Revert "change SessionPool's List as List ref" This reverts commit 890329f352bd5b6413cec85002fe803b04b28456. debug --- client_test.go | 8 ++++---- session_pool.go | 1 - session_test.go | 12 ++++++------ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/client_test.go b/client_test.go index fa4c7e1d..8c42b545 100644 --- a/client_test.go +++ b/client_test.go @@ -1330,10 +1330,10 @@ func TestReconnect(t *testing.T) { for i := 0; i < timeoutConfig.MaxConnPoolSize; i++ { time.Sleep(200 * time.Millisecond) if i == 3 { - stopContainer(t, "nebula-docker-compose_graphd0_1") + stopContainer(t, "nebula-docker-compose-graphd0-1") } if i == 7 { - stopContainer(t, "nebula-docker-compose_graphd1_1") + stopContainer(t, "nebula-docker-compose-graphd1-1") } _, err := session.Execute("SHOW HOSTS;") fmt.Println("Sending query...") @@ -1351,8 +1351,8 @@ func TestReconnect(t *testing.T) { } checkResultSet(t, "SHOW HOSTS;", resp) - startContainer(t, "nebula-docker-compose_graphd0_1") - startContainer(t, "nebula-docker-compose_graphd1_1") + startContainer(t, "nebula-docker-compose-graphd0-1") + startContainer(t, "nebula-docker-compose-graphd1-1") // Wait for graphd to be up time.Sleep(5 * time.Second) diff --git a/session_pool.go b/session_pool.go index 7ba45f9a..e3b7ee95 100644 --- a/session_pool.go +++ b/session_pool.go @@ -39,7 +39,6 @@ type SessionPool struct { idleSessions list.List activeSessions list.List conf SessionPoolConf - tz timezoneInfo log Logger closed bool cleanerChan chan struct{} //notify when pool is close diff --git a/session_test.go b/session_test.go index f61dffa8..f9ff8a75 100644 --- a/session_test.go +++ b/session_test.go @@ -101,15 +101,15 @@ func TestSession_Recover(t *testing.T) { _, _ = sess.Execute(query) } }() - stopContainer(t, "nebula-docker-compose_graphd0_1") - stopContainer(t, "nebula-docker-compose_graphd1_1") - stopContainer(t, "nebula-docker-compose_graphd2_1") + stopContainer(t, "nebula-docker-compose-graphd0-1") + stopContainer(t, "nebula-docker-compose-graphd1-1") + stopContainer(t, "nebula-docker-compose-graphd2-1") defer func() { - startContainer(t, "nebula-docker-compose_graphd1_1") - startContainer(t, "nebula-docker-compose_graphd2_1") + startContainer(t, "nebula-docker-compose-graphd1-1") + startContainer(t, "nebula-docker-compose-graphd2-1") }() <-time.After(3 * time.Second) - startContainer(t, "nebula-docker-compose_graphd0_1") + startContainer(t, "nebula-docker-compose-graphd0-1") <-time.After(3 * time.Second) _, err = sess.Execute(query) if err != nil {