From ef8a56691202c4564ad1e799aa0cc98fd10af6ae Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Wed, 16 Nov 2022 08:12:39 +0100 Subject: [PATCH] Force update metadata on Kafka test --- tests/test_broadcast.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_broadcast.py b/tests/test_broadcast.py index e3313bc..ca5bd80 100644 --- a/tests/test_broadcast.py +++ b/tests/test_broadcast.py @@ -1,3 +1,5 @@ +# import asyncio + import pytest from broadcaster import Broadcast @@ -35,11 +37,11 @@ async def test_postgres(): assert event.message == "hello" -@pytest.mark.skip("Deadlock on `next_published`") @pytest.mark.asyncio async def test_kafka(): async with Broadcast("kafka://localhost:9092") as broadcast: async with broadcast.subscribe("chatroom") as subscriber: + await broadcast._backend._consumer._client.force_metadata_update() # type: ignore await broadcast.publish("chatroom", "hello") event = await subscriber.get() assert event.channel == "chatroom"