From e3fe807442fbb563b1ad522efdab8f80a85cade5 Mon Sep 17 00:00:00 2001 From: Vikram Patki 24489 Date: Tue, 29 Jun 2021 15:14:17 -0400 Subject: [PATCH] fix for consumer errors in app #166 --- tests/unit/transport/test_consumer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/transport/test_consumer.py b/tests/unit/transport/test_consumer.py index 6af22e1c8..b4cc668f7 100644 --- a/tests/unit/transport/test_consumer.py +++ b/tests/unit/transport/test_consumer.py @@ -1386,7 +1386,7 @@ async def test_verify_all_partitions_active(self, *, consumer): with patch("faust.transport.consumer.monotonic") as monotonic: now = monotonic.return_value = 391243.231 - consumer.verify_all_partitions_active() + await consumer.verify_all_partitions_active() consumer.verify_event_path.assert_has_calls( [ @@ -1405,13 +1405,13 @@ async def test_verify_all_partitions_active__bail_on_sleep(self, *, consumer): consumer.sleep = AsyncMock() async def on_sleep(secs): - if consumer.sleep.call_count == 2: + if consumer.sleep.call_count == 4: consumer._stopped.set() consumer.sleep.side_effect = on_sleep with patch("faust.transport.consumer.monotonic") as monotonic: now = monotonic.return_value = 391243.231 - consumer.verify_all_partitions_active() + await consumer.verify_all_partitions_active() consumer.verify_event_path.assert_called_with(now, TP3)