Skip to content

Commit 456893a

Browse files
committed
fix: use supported asyncio timeout for earlier python versions
1 parent c3c763e commit 456893a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/asyncio_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ async def test_get_partitioned_topic_name(self):
193193
producer = await self._client.create_producer("persistent://public/default/partitioned_topic_name_test")
194194
await producer.send(b"hello")
195195

196-
async with asyncio.timeout(TIMEOUT_MS / 1000):
197-
msg = await consumer.receive()
196+
msg = await asyncio.wait_for(consumer.receive(), TIMEOUT_MS / 1000)
198197
self.assertTrue(msg.topic_name() in partitions)
199198

200199
async def test_create_producer_failure(self):

0 commit comments

Comments
 (0)