(c *C)
| 25 | } |
| 26 | |
| 27 | func (t *PoolTest) TestPoolReusesConnection(c *C) { |
| 28 | for i := 0; i < 100; i++ { |
| 29 | _, err := t.db.Exec("SELECT 'test_pool_reuses_connection'") |
| 30 | c.Assert(err, IsNil) |
| 31 | } |
| 32 | |
| 33 | c.Assert(t.db.Pool().Len(), Equals, 1) |
| 34 | c.Assert(t.db.Pool().IdleLen(), Equals, 1) |
| 35 | } |
| 36 | |
| 37 | func (t *PoolTest) TestPoolMaxSize(c *C) { |
| 38 | N := 1000 |