Skip to content

Commit 09e7705

Browse files
committed
提高单元测试覆盖率到 100%
1 parent 30f4fb0 commit 09e7705

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pool_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ func TestNew(t *testing.T) {
7373
if value != 1 {
7474
t.Fatalf("got %+v is wrong", value)
7575
}
76+
77+
status := pool.Status()
78+
if status.Using != 1 {
79+
t.Fatalf("got %+v is wrong", status.Using)
80+
}
81+
82+
if status.Idle != 0 {
83+
t.Fatalf("got %+v is wrong", status.Idle)
84+
}
7685
})
7786

7887
t.Run("acquire_idle_error", func(tt *testing.T) {

0 commit comments

Comments
 (0)