Skip to content

Commit d03886a

Browse files
committed
Close the pool before destroying the test database.
1 parent 0c6d9ce commit d03886a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

django/db/backends/postgresql/creation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,7 @@ def _clone_test_db(self, suffix, verbosity, keepdb=False):
8585
except Exception as e:
8686
self.log("Got an error cloning the test database: %s" % e)
8787
sys.exit(2)
88+
89+
def _destroy_test_db(self, test_database_name, verbosity):
90+
self.connection.close_pool()
91+
return super()._destroy_test_db(test_database_name, verbosity)

0 commit comments

Comments
 (0)