Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjm committed Sep 6, 2023
1 parent 7ff140d commit 5a3bcbf
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions clickhouse_options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package clickhouse
import (
"crypto/tls"
"testing"
"time"

"github.com/stretchr/testify/assert"
)
Expand Down Expand Up @@ -449,6 +450,23 @@ func TestParseDSN(t *testing.T) {
},
"",
},
{
"client connection pool settings",
"clickhouse://127.0.0.1/test_database?max_open_conns=-1&max_idle_conns=0&conn_max_lifetime=1h",
&Options{
Protocol: Native,
MaxOpenConns: -1,
MaxIdleConns: 0,
ConnMaxLifetime: time.Hour,
Addr: []string{"127.0.0.1"},
Settings: Settings{},
Auth: Auth{
Database: "test_database",
},
scheme: "clickhouse",
},
"",
},
}

for _, testCase := range testCases {
Expand Down

0 comments on commit 5a3bcbf

Please sign in to comment.