@@ -64,10 +64,22 @@ func TestReopenPool(t *testing.T) {
64
64
65
65
connPool := NewPool (env , "TestPool" , cfg )
66
66
connPool .Open (params , params , params )
67
+
68
+ dbConn , err := connPool .Get (context .Background (), nil )
69
+ require .NoError (t , err )
70
+ require .NotNil (t , dbConn )
71
+
72
+ dbConn .Recycle ()
67
73
connPool .Close ()
68
74
69
75
connPool = NewPool (env , "TestPool" , cfg )
70
76
connPool .Open (params , params , params )
77
+
78
+ dbConn , err = connPool .Get (context .Background (), nil )
79
+ require .NoError (t , err )
80
+ require .NotNil (t , dbConn )
81
+
82
+ dbConn .Recycle ()
71
83
connPool .Close ()
72
84
}
73
85
@@ -85,10 +97,22 @@ func TestReopenPoolUnnamedEnv(t *testing.T) {
85
97
86
98
connPool := NewPool (env , "TestPool" , cfg )
87
99
connPool .Open (params , params , params )
100
+
101
+ dbConn , err := connPool .Get (context .Background (), nil )
102
+ require .NoError (t , err )
103
+ require .NotNil (t , dbConn )
104
+
105
+ dbConn .Recycle ()
88
106
connPool .Close ()
89
107
90
108
connPool = NewPool (env , "TestPool" , cfg )
91
109
connPool .Open (params , params , params )
110
+
111
+ dbConn , err = connPool .Get (context .Background (), nil )
112
+ require .NoError (t , err )
113
+ require .NotNil (t , dbConn )
114
+
115
+ dbConn .Recycle ()
92
116
connPool .Close ()
93
117
}
94
118
0 commit comments