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

Better test coverage #18

Open
eserte opened this issue Jul 31, 2019 · 1 comment
Open

Better test coverage #18

eserte opened this issue Jul 31, 2019 · 1 comment

Comments

@eserte
Copy link
Contributor

eserte commented Jul 31, 2019

It would be nice to further increase test coverage. To do so I think we have to run tests against a real kafka server. There's some work in progress to implement this: https://github.com/idealo/Kafka-Librd/blob/more-testing-with-broker/t/fulltest.t
This test script starts zookeeper and kafka on the fly with temporary directories and ports, and runs some Kafka::Librd commands on this.

However a lot of polishing is still needed:

  • probably this test script should only run in some environments (e.g. in some travis-ci configurations, and if the user explicitly requests it)
  • kafka should be made available, either downloaded by the test script or outside using .travis.yml
  • zookeeper should be made available, either downloaded by the test script or outside using .travis.yml; installation could also be done via package manager at least on debian-based systems
  • there are some sleep() calls in the test script which should be removed
  • more test cases have to be written
@plicease
Copy link
Member

Thanks for opening this, I was thinking along these lines as well.

It would be nice (esp. for CI, but also for local dev) to be able to test against a kafka docker instance to avoid the dependencies on zookeeper etc. I did some minimal poking around on dockerhub and didn't find anything that looked well supported or recent though.

Agree that live testing against real kafka server should happen in CI plus with an appropriate Kafka::Librd specific environment variable for developers. Obviously don't want to be clever and detect an instance that turns out to be a server handling production traffic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants