We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfc04cf commit ac79167Copy full SHA for ac79167
tests/dragonfly/connection_test.py
@@ -40,8 +40,10 @@ async def start(self):
40
self._monitor_task = asyncio.create_task(self._monitor())
41
await asyncio.sleep(0.1)
42
43
- async def stop(self):
+ async def stop(self, timeout=0.1):
44
if self._monitor_task:
45
+ # Wait for Dragonfly to send all async monitor messages
46
+ await asyncio.sleep(timeout)
47
self._monitor_task.cancel()
48
try:
49
await self._monitor_task
@@ -98,7 +100,7 @@ async def test_monitor_command_multi(async_pool):
98
100
99
101
await p.execute()
102
- collected = await monitor.stop()
103
+ collected = await monitor.stop(0.3)
104
expected = CollectedRedisMsg.all_from_src(*expected)
105
106
# The order is random due to squashing
0 commit comments