Skip to content

Commit

Permalink
test: Fix old markings for chord tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maybe-sybr committed Oct 14, 2020
1 parent a4d074d commit 4f606d5
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions t/integration/test_canvas.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import os
from datetime import datetime, timedelta
from time import sleep

import pytest

from celery import chain, chord, group, signature
from celery.backends.base import BaseKeyValueStoreBackend
from celery.exceptions import ChordError, TimeoutError
from celery.exceptions import TimeoutError
from celery.result import AsyncResult, GroupResult, ResultSet

from .conftest import get_active_redis_channels, get_redis_connection
Expand Down Expand Up @@ -673,10 +672,12 @@ def test_eager_chord_inside_task(self, manager):

chord_add.app.conf.task_always_eager = prev

@flaky
def test_group_chain(self, manager):
if not manager.app.conf.result_backend.startswith('redis'):
raise pytest.skip('Requires redis result backend.')
try:
manager.app.backend.ensure_chords_allowed()
except NotImplementedError as e:
raise pytest.skip(e.args[0])

c = (
add.s(2, 2) |
group(add.s(i) for i in range(4)) |
Expand All @@ -685,11 +686,6 @@ def test_group_chain(self, manager):
res = c()
assert res.get(timeout=TIMEOUT) == [12, 13, 14, 15]

@flaky
@pytest.mark.xfail(os.environ['TEST_BACKEND'] == 'cache+pylibmc://',
reason="Not supported yet by the cache backend.",
strict=True,
raises=ChordError)
def test_nested_group_chain(self, manager):
try:
manager.app.backend.ensure_chords_allowed()
Expand Down

0 comments on commit 4f606d5

Please sign in to comment.