Skip to content

Commit 0b57b71

Browse files
committed
fix: flaky test tweak
1 parent 7cacc10 commit 0b57b71

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

tests/unit/test_channels/test_plugin.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async def test_pub_sub_non_blocking(channels_backend: ChannelsBackend, channel:
9696
subscriber = await plugin.subscribe(channel)
9797
plugin.publish(b"foo", channel)
9898

99-
await asyncio.sleep(0.1) # give the worker time to process things
99+
await asyncio.sleep(0.5) # give the worker time to process things
100100

101101
res = await get_from_stream(subscriber, 1)
102102

@@ -156,7 +156,7 @@ async def test_ws_route_handlers_receive_arbitrary_message(channels_backend: Cha
156156

157157

158158
@pytest.mark.flaky(reruns=15)
159-
def test_create_ws_route_handlers_arbitrary_channels_allowed(channels_backend: ChannelsBackend) -> None:
159+
async def test_create_ws_route_handlers_arbitrary_channels_allowed(channels_backend: ChannelsBackend) -> None:
160160
channels_plugin = ChannelsPlugin(
161161
backend=channels_backend,
162162
arbitrary_channels_allowed=True,
@@ -171,7 +171,7 @@ def test_create_ws_route_handlers_arbitrary_channels_allowed(channels_backend: C
171171
channels_plugin.publish("something", "foo")
172172
assert ws.receive_text(timeout=2) == "something"
173173

174-
time.sleep(0.1)
174+
time.sleep(0.5)
175175

176176
with client.websocket_connect("/ws/bar") as ws:
177177
channels_plugin.publish("something else", "bar")

uv.lock

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)