Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Unit test producer that takes confluent_kafka.Producer as dependency #1738

Open
1 of 7 tasks
dineshkumare5 opened this issue May 6, 2024 · 0 comments
Open
1 of 7 tasks

Comments

@dineshkumare5
Copy link

dineshkumare5 commented May 6, 2024

Description

confluent_kafka.Producer class has Owner. This is making any class that takes a dependency on Producer not testable.

How to reproduce

Create a class that takes dependency on Producer object. The Producer object cannot be mocked.

Checklist

Please provide the following information:

  • confluent-kafka-python and librdkafka version (confluent_kafka.version() and confluent_kafka.libversion()):
  • Apache Kafka broker version:
  • Client configuration: {...}
  • Operating system:
  • Provide client logs (with 'debug': '..' as necessary)
  • Provide broker log excerpts
  • Critical issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant