From aa15ee553aa1f3582fbb1cf094b0987bff88f7d8 Mon Sep 17 00:00:00 2001 From: Sakib Hasan Date: Mon, 17 Apr 2017 16:16:59 -0400 Subject: [PATCH] Fix too many connection error (#261) Disconnect db instance on TX test which makes multiple pool connection --- test/transaction.promise.test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/transaction.promise.test.js b/test/transaction.promise.test.js index 127cbe4..7041d48 100644 --- a/test/transaction.promise.test.js +++ b/test/transaction.promise.test.js @@ -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 hooks = []; // Return an async function to start a transaction and create a post