You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use the confluent-kafka-python in our codebase, and sometimes we have problems with message consumption (not all messages consumed, compared to what we produced by our code).
Do you have a manual or snippet of the best way to use Kafka in tests? Because I think about pathing the Kafka producer and consumer to be a python dicts (queue name -> list of messages), when it's problems with message deliveries, the happens randomly for our tests.
Will be happy if someone can explain the best practice how to use the patched version of the Kafka in the tests (we use pytest for tests).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
How to properly use Kafka in the pytest?
We use the
confluent-kafka-python
in our codebase, and sometimes we have problems with message consumption (not all messages consumed, compared to what we produced by our code).Do you have a manual or snippet of the best way to use Kafka in tests? Because I think about pathing the Kafka producer and consumer to be a python dicts (queue name -> list of messages), when it's problems with message deliveries, the happens randomly for our tests.
Will be happy if someone can explain the best practice how to use the patched version of the Kafka in the tests (we use pytest for tests).
Beta Was this translation helpful? Give feedback.
All reactions