Prevent deadlocks on unit tests in a very specific scenario

This commit is contained in:
Matthew Jones 2014-03-18 12:02:14 -04:00
parent fe625785c7
commit 7fe474aec5
2 changed files with 2 additions and 1 deletions

View File

@ -143,7 +143,7 @@ def rebuild_graph(message):
''' Regenerate the task graph by refreshing known tasks from Tower, purging orphaned running tasks,
and creatingdependencies for new tasks before generating directed edge relationships between those tasks '''
inspector = inspect()
if not hasattr(settings, 'UNIT_TEST_IGNORE_TASK_WAIT'):
if not hasattr(settings, 'IGNORE_CELERY_INSPECTOR'):
active_task_queues = inspector.active()
else:
print("Ignoring celery task inspector")

View File

@ -977,6 +977,7 @@ class InventoryTest(BaseTest):
@override_settings(CELERY_ALWAYS_EAGER=True,
CELERY_EAGER_PROPAGATES_EXCEPTIONS=True,
IGNORE_CELERY_INSPECTOR=True
UNIT_TEST_IGNORE_TASK_WAIT=True,
PEXPECT_TIMEOUT=60)
class InventoryUpdatesTest(BaseTransactionTest):