Browse Source

Add debugging to integration tests

Ask Solem 8 years ago
parent
commit
f0dc5500bc
2 changed files with 12 additions and 4 deletions
  1. 11 3
      t/integration/test_canvas.py
  2. 1 1
      tox.ini

+ 11 - 3
t/integration/test_canvas.py

@@ -3,7 +3,7 @@ import pytest
 from celery import chain, group, uuid
 from .tasks import add, collect_ids, ids
 
-TIMEOUT = 30
+TIMEOUT = 120
 
 
 class test_chain:
@@ -27,7 +27,13 @@ class test_chain:
         c = chain(ids.si(i) for i in range(num))
         c.freeze()
         res = c()
-        res.get(timeout=TIMEOUT)
+        try:
+            res.get(timeout=TIMEOUT)
+        except TimeoutError:
+            print(manager.inspect.active())
+            print(manager.inspect.reserved())
+            print(manager.inspect.stats())
+            raise
         self.assert_ids(res, num - 1)
 
     def assert_ids(self, res, size):
@@ -62,11 +68,13 @@ class test_group:
             assert value == i + 2
 
 
+@pytest.mark.celery(result_backend='redis://')
 class xxx_chord:
 
-    @pytest.mark.celery(result_backend='redis://')
     def test_parent_ids(self, manager):
         self.assert_parentids_chord()
+
+    def test_parent_ids__already_set(self, manager):
         self.assert_parentids_chord(uuid(), uuid())
 
     def assert_parentids_chord(self, base_root=None, base_parent=None):

+ 1 - 1
tox.ini

@@ -28,7 +28,7 @@ commands =
     unit: py.test -xv
     integration: py.test -xsv t/integration
 setenv =
-    WORKER_LOGLEVEL = debug
+    WORKER_LOGLEVEL = INFO
 
 basepython =
     2.7: python2.7