Class KafkaJunitRule

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

    public class KafkaJunitRule
    extends org.junit.rules.ExternalResource
    • Method Detail

      • before

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

        protected void after()
        Overrides:
        after in class org.junit.rules.ExternalResource
      • helper

        public KafkaHelper helper()
        Obtain a KafkaHelper that provides a bunch of convenience methods
        Returns:
        KafkaHelper
      • waitForStartup

        public KafkaJunitRule waitForStartup()
        Returns:
        A new instance of KafkaJunitRule that will wait for the broker to finish starting before executing tests.
      • dontWaitForStartup

        public KafkaJunitRule dontWaitForStartup()
        Returns:
        A new instance of KafkaJunitRule that will NOT wait for the broker to finish starting before executing tests