semvec/pypi-packages huggingface dataset:
testing.kafka 0.0.1
automatically setups a kafka instance for testing
License: Apache License 2.0


Install
=======
Use pip::

   $ pip install testing.kafka

``testing.kafka`` requires ``zookeeper``, ``kafka`` and ``java`` to be installed.


Usage
=====
Create Kafka and Zookeeper instances::

  @pytest.fixture
  def kafka():

      zookeeper = testing.zookeeper.ZookeeperServer()
      kafka = testing.kafka.KafkaServer(zookeeper_url=zookeeper.url())

      yield kafka

      kafka.stop(_signal=signal.SIGKILL)
      zookeeper.stop(_signal=signal.SIGKILL)