From 9b247cde951acc055e78f6148dd0ec6e4763634d Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Wed, 16 Nov 2022 08:12:39 +0100 Subject: [PATCH 1/2] Force update metadata on Kafka test --- tests/test_broadcast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_broadcast.py b/tests/test_broadcast.py index e3313bc..908a8e8 100644 --- a/tests/test_broadcast.py +++ b/tests/test_broadcast.py @@ -35,11 +35,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" From 0990ac884aa745b0eac32e084aeecd055dfd36e8 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Sat, 17 Dec 2022 12:24:53 +0100 Subject: [PATCH 2/2] Add importlib-metadata to requirements --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 02846f0..146763c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,6 +13,7 @@ wheel==0.37.1 autoflake==1.4 black==22.6.0 coverage==6.4.4 +importlib-metadata==4.13.0 flake8==3.9.2 flake8-bugbear==22.7.1 flake8-pie==0.16.0