Skip to content

Commit 422d735

Browse files
committed
Refs #348 -- Marked problem test cases as xfail.
- test_receive_cancel failing with TypeError inside redis-py. - test_message_expiry__group_send__one_channel_expires_message hanging indefinitely. Added pytest-timeout with global timeout of 10s.
1 parent 89b29ad commit 422d735

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
addopts = -p no:django
33
testpaths = tests
44
asyncio_mode = auto
5+
timeout = 10
56

67
[flake8]
78
exclude = venv/*,tox/*,specs/*,build/*

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"pytest",
1414
"pytest-asyncio",
1515
"async-timeout",
16+
"pytest-timeout",
1617
]
1718

1819

tests/test_core.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,12 @@ def test_repeated_group_send_with_async_to_sync(channel_layer):
419419
pytest.fail(f"repeated async_to_sync wrapped group_send calls raised {exc}")
420420

421421

422+
@pytest.mark.xfail(
423+
reason="""
424+
Fails with error in redis-py: int() argument must be a string, a bytes-like
425+
object or a real number, not 'NoneType'. Refs: #348
426+
"""
427+
)
422428
@pytest.mark.asyncio
423429
async def test_receive_cancel(channel_layer):
424430
"""
@@ -551,6 +557,7 @@ async def test_message_expiry__group_send(channel_layer):
551557
await channel_layer.receive(channel_name)
552558

553559

560+
@pytest.mark.xfail(reason="Fails with timeout. Refs: #348")
554561
@pytest.mark.asyncio
555562
async def test_message_expiry__group_send__one_channel_expires_message(channel_layer):
556563
expiry = 3

tests/test_sentinel.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,12 @@ async def test_group_send_capacity_multiple_channels(channel_layer, caplog):
461461
)
462462

463463

464+
@pytest.mark.xfail(
465+
reason="""
466+
Fails with error in redis-py: int() argument must be a string, a bytes-like
467+
object or a real number, not 'NoneType'. Refs: #348
468+
"""
469+
)
464470
@pytest.mark.asyncio
465471
async def test_receive_cancel(channel_layer):
466472
"""
@@ -593,6 +599,7 @@ async def test_message_expiry__group_send(channel_layer):
593599
await channel_layer.receive(channel_name)
594600

595601

602+
@pytest.mark.xfail(reason="Fails with timeout. Refs: #348")
596603
@pytest.mark.asyncio
597604
async def test_message_expiry__group_send__one_channel_expires_message(channel_layer):
598605
expiry = 3

0 commit comments

Comments
 (0)