Commit dd262030 authored by Christos Stavrakakis's avatar Christos Stavrakakis

Tests should succeed even if tearing down DB fails

parent 9104a3d9
...@@ -59,6 +59,7 @@ from django.db.backends.creation import TEST_DATABASE_PREFIX ...@@ -59,6 +59,7 @@ from django.db.backends.creation import TEST_DATABASE_PREFIX
import django.utils.simplejson as json import django.utils.simplejson as json
import sys
import random import random
import functools import functools
...@@ -151,8 +152,11 @@ class PithosTestSuiteRunner(DjangoTestSuiteRunner): ...@@ -151,8 +152,11 @@ class PithosTestSuiteRunner(DjangoTestSuiteRunner):
def teardown_databases(self, old_config, **kwargs): def teardown_databases(self, old_config, **kwargs):
from pithos.api.util import _pithos_backend_pool from pithos.api.util import _pithos_backend_pool
_pithos_backend_pool.shutdown() _pithos_backend_pool.shutdown()
super(PithosTestSuiteRunner, self).teardown_databases(old_config, try:
**kwargs) super(PithosTestSuiteRunner, self).teardown_databases(old_config,
except Exception as e:
sys.stderr.write("FAILED to teardown databases: %s\n" % str(e))
class PithosTestClient(Client): class PithosTestClient(Client):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment