Skip to content

Commit

Permalink
Fix test for acquireConnectionTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
tgriesser committed Oct 9, 2016
1 parent a24e4df commit dc431f8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/integration/builder/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ module.exports = function(knex) {
});
});

it('#1694, #1703 it should return connections to pool if acquireConnectionTimeout is triggered', () => {
it('#1694, #1703 it should return connections to pool if acquireConnectionTimeout is triggered', function() {
const db = Knex({
client: knex.client.driverName,
pool: {
Expand All @@ -321,9 +321,7 @@ module.exports = function(knex) {
return db.transaction(function() {})
}).then(function () {
throw new Error('should not get here')
}).catch((error) => {
// Should get here after 300 ms.
})
}).catch(Promise.TimeoutError, (error) => {})
})

});
Expand Down

0 comments on commit dc431f8

Please sign in to comment.