Skip to content

Commit

Permalink
change docker-compose to docker compose
Browse files Browse the repository at this point in the history
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 890329f.

debug
  • Loading branch information
haoxins committed Sep 14, 2024
1 parent 6804fc9 commit c37c273
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...")
Expand All @@ -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)
Expand Down
1 change: 0 additions & 1 deletion session_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c37c273

Please sign in to comment.