We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad73407 commit 2aa207eCopy full SHA for 2aa207e
test/index.js
@@ -70,15 +70,11 @@ describe('pool', function () {
70
it('properly pools clients', co.wrap(function * () {
71
var pool = new Pool({ poolSize: 9 })
72
var count = 0
73
- while (count < 30) {
74
- count++
75
- pool.connect().then(function (client) {
76
- client.queryAsync('select $1::text as name', ['hi']).then(function (res) {
77
- client.release()
78
- })
79
80
- }
81
- yield Promise.delay(100)
+ yield _.times(30).map(function * () {
+ var client = yield pool.connect()
+ var result = yield client.queryAsync('select $1::text as name', ['hi'])
+ client.release()
+ })
82
expect(pool.pool.getPoolSize()).to.be(9)
83
return yield pool.end()
84
}))
0 commit comments