Skip to content

owbear/kafka-network-failure-tests

 
 

Repository files navigation

kafka-network-failure-tests

A suite of tests of kafka in failing network. Based on https://github.com/wurstmeister/kafka-docker. Please refer to the original README.md for information on how to build and configure the image.

Pre-Requisites

  • install docker-compose https://docs.docker.com/compose/install/
  • install docker-py https://github.com/docker/docker-py/
  • modify ZK_COMMAND in kafka-network-tests.py to match your zookeeper image
  • if you want to customize any Kafka parameters, simply add them as environment variables in docker-compose.yml, e.g. in order to increase the message.max.bytes parameter set the environment to

Running the tests

  • run all tests: py.test -s kafka-network-tests.py
  • run individual tests: py.test -s kafka-network-tests.py -k test_producing_to_lost_leader_using_java_producer_and_ifdown
  • run individual tests: py.test -s kafka-network-tests.py -k test_producing_to_lost_leader_using_librdkafka_producer_and_ifdown

Sample results

The test with the java producer and ifdown shows that there's a 9-23 seconds long gap where no values were stored in the log after the network was taken down.

The test with the librdkafka producer and ifdown shows that no values was stored in the log after the network was taken down at.

About

Kafka cluster tests in failing network

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 65.0%
  • Shell 35.0%