Skip to content

Commit

Permalink
Refs django#348 -- Marked problem test cases as xfail.
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
carltongibson authored and Shi Feng committed Jun 16, 2023
1 parent a067352 commit e304ff4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
addopts = -p no:django
testpaths = tests
asyncio_mode = auto
timeout = 10

[flake8]
exclude = venv/*,tox/*,specs/*,build/*
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"pytest",
"pytest-asyncio",
"async-timeout",
"pytest-timeout",
]


Expand Down
7 changes: 7 additions & 0 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,12 @@ def test_repeated_group_send_with_async_to_sync(channel_layer):
pytest.fail(f"repeated async_to_sync wrapped group_send calls raised {exc}")


@pytest.mark.xfail(
reason="""
Fails with error in redis-py: int() argument must be a string, a bytes-like
object or a real number, not 'NoneType'. Refs: #348
"""
)
@pytest.mark.asyncio
async def test_receive_cancel(channel_layer):
"""
Expand Down Expand Up @@ -631,6 +637,7 @@ async def test_message_expiry__group_send(channel_layer):
await channel_layer.receive(channel_name)


@pytest.mark.xfail(reason="Fails with timeout. Refs: #348")
@pytest.mark.asyncio
async def test_message_expiry__group_send__one_channel_expires_message(channel_layer):
expiry = 3
Expand Down
7 changes: 7 additions & 0 deletions tests/test_sentinel.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,12 @@ async def test_group_send_capacity_multiple_channels(channel_layer, caplog):
)


@pytest.mark.xfail(
reason="""
Fails with error in redis-py: int() argument must be a string, a bytes-like
object or a real number, not 'NoneType'. Refs: #348
"""
)
@pytest.mark.asyncio
async def test_receive_cancel(channel_layer):
"""
Expand Down Expand Up @@ -593,6 +599,7 @@ async def test_message_expiry__group_send(channel_layer):
await channel_layer.receive(channel_name)


@pytest.mark.xfail(reason="Fails with timeout. Refs: #348")
@pytest.mark.asyncio
async def test_message_expiry__group_send__one_channel_expires_message(channel_layer):
expiry = 3
Expand Down

0 comments on commit e304ff4

Please sign in to comment.