Skip to content

Commit

Permalink
fix for consumer errors in app #166
Browse files Browse the repository at this point in the history
  • Loading branch information
patkivikram committed Jun 29, 2021
1 parent 75a1231 commit e3fe807
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/transport/test_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand All @@ -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)

0 comments on commit e3fe807

Please sign in to comment.