Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Move dbSandbox.destroy call to tnd phase of cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
4miners committed Oct 12, 2017
1 parent 037b144 commit 2166542
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/common/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ function __init (initScope, done) {
};

function cleanup (cb) {
// Disconnect from database instance if sandbox was used
if (dbSandbox) {
dbSandbox.destroy();
}
node.async.eachSeries(currentAppScope.modules, function (module, seriesCb) {
if (typeof(module.cleanup) === 'function') {
module.cleanup(seriesCb);
Expand All @@ -306,6 +302,10 @@ function cleanup (cb) {
} else {
currentAppScope.logger.info('Cleaned up successfully');
}
// Disconnect from database instance if sandbox was used
if (dbSandbox) {
dbSandbox.destroy();
}
cb();
});
};
Expand Down

0 comments on commit 2166542

Please sign in to comment.