From 644b337181d99ca68fa39bec41d90d22fe24226a Mon Sep 17 00:00:00 2001
From: Jimmie Han <hanjinming@outlook.com>
Date: Wed, 6 Sep 2023 20:38:28 +0800
Subject: [PATCH] add unit test

---
 clickhouse_options_test.go | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/clickhouse_options_test.go b/clickhouse_options_test.go
index bfce52f1d1..a39aeccc7f 100644
--- a/clickhouse_options_test.go
+++ b/clickhouse_options_test.go
@@ -20,6 +20,7 @@ package clickhouse
 import (
 	"crypto/tls"
 	"testing"
+	"time"
 
 	"github.com/stretchr/testify/assert"
 )
@@ -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 {