Fix too many connection error (#261)

Disconnect db instance on TX test which makes multiple pool connection
This commit is contained in:
Sakib Hasan 2017-04-17 16:16:59 -04:00 committed by GitHub
parent f9ab75c1d9
commit aa15ee553a
1 changed files with 7 additions and 0 deletions

View File

@ -30,6 +30,13 @@ describe('transactions with promise', function() {
}); });
}); });
after(function(done) {
// disconnect from this db to avoid too many connection error
// due to multiple instance of connection pool
db.disconnect();
done();
});
var currentTx; var currentTx;
var hooks = []; var hooks = [];
// Return an async function to start a transaction and create a post // Return an async function to start a transaction and create a post