Class JUnitKafkaServer

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public class JUnitKafkaServer
    extends org.junit.rules.ExternalResource
    This class starts up an embedded Kafka server for use in integration tests.
    Author:
    Seth
    • Constructor Detail

      • JUnitKafkaServer

        public JUnitKafkaServer()
      • JUnitKafkaServer

        public JUnitKafkaServer​(String kafkaLogDir)
      • JUnitKafkaServer

        public JUnitKafkaServer​(org.junit.rules.TemporaryFolder temporaryFolder)
    • Method Detail

      • before

        public void before()
                    throws Exception
        Overrides:
        before in class org.junit.rules.ExternalResource
        Throws:
        Exception
      • after

        public void after()
        Overrides:
        after in class org.junit.rules.ExternalResource
      • getKafkaConnectString

        public String getKafkaConnectString()
      • getZookeeperConnectString

        public String getZookeeperConnectString()
      • stopKafkaServer

        public void stopKafkaServer()
      • startKafkaServer

        public void startKafkaServer()