Firebase Update

This commit is contained in:
Lukas Nowy
2018-12-22 23:30:39 +01:00
parent befb44764d
commit acffe619b3
11523 changed files with 1614327 additions and 930246 deletions

View File

@ -73,6 +73,28 @@ describe('connection timeout', () => {
})
})
it('should not break further pending checkouts on a timeout', (done) => {
const pool = new Pool({ connectionTimeoutMillis: 200, max: 1 })
pool.connect((err, client, releaseOuter) => {
expect(err).to.be(undefined)
pool.connect((err, client) => {
expect(err).to.be.an(Error)
expect(client).to.be(undefined)
releaseOuter()
})
setTimeout(() => {
pool.connect((err, client, releaseInner) => {
expect(err).to.be(undefined)
expect(client).to.not.be(undefined)
releaseInner()
pool.end(done)
})
}, 100)
})
})
it('should timeout on query if all clients are busy', (done) => {
const pool = new Pool({ connectionTimeoutMillis: 100, max: 1 })
pool.connect((err, client, release) => {