Browse Source

Mark integration tests as flaky

Ask Solem 8 years ago
parent
commit
c7d05abe0d

+ 1 - 1
requirements/test-integration.txt

@@ -1,3 +1,3 @@
 simplejson
 simplejson
-cyanide>=1.3
+flaky>=3.3
 -r extras/redis.txt
 -r extras/redis.txt

+ 4 - 0
t/integration/test_canvas.py

@@ -1,5 +1,6 @@
 from __future__ import absolute_import, unicode_literals
 from __future__ import absolute_import, unicode_literals
 import pytest
 import pytest
+from flaky import flaky
 from celery import chain, chord, group
 from celery import chain, chord, group
 from celery.exceptions import TimeoutError
 from celery.exceptions import TimeoutError
 from celery.result import AsyncResult, GroupResult
 from celery.result import AsyncResult, GroupResult
@@ -8,6 +9,7 @@ from .tasks import add, collect_ids, ids
 TIMEOUT = 120
 TIMEOUT = 120
 
 
 
 
+@flaky
 class test_chain:
 class test_chain:
 
 
     def test_simple_chain(self, manager):
     def test_simple_chain(self, manager):
@@ -53,6 +55,7 @@ class test_chain:
             i -= 1
             i -= 1
 
 
 
 
+@flaky
 class test_group:
 class test_group:
 
 
     def test_parent_ids(self, manager):
     def test_parent_ids(self, manager):
@@ -81,6 +84,7 @@ def assert_ids(r, expected_value, expected_root_id, expected_parent_id):
     assert parent_id == expected_parent_id
     assert parent_id == expected_parent_id
 
 
 
 
+@flaky
 class test_chord:
 class test_chord:
 
 
     def test_parent_ids(self, manager):
     def test_parent_ids(self, manager):

+ 2 - 0
t/integration/test_tasks.py

@@ -1,8 +1,10 @@
 from __future__ import absolute_import, unicode_literals
 from __future__ import absolute_import, unicode_literals
+from flaky import flaky
 from celery import group
 from celery import group
 from .tasks import print_unicode, sleeping
 from .tasks import print_unicode, sleeping
 
 
 
 
+@flaky
 class test_tasks:
 class test_tasks:
 
 
     def test_task_accepted(self, manager, sleep=1):
     def test_task_accepted(self, manager, sleep=1):