Class KafkaJunitRule

java.lang.Object
org.junit.rules.ExternalResource
com.github.charithe.kafka.KafkaJunitRule
All Implemented Interfaces:
org.junit.rules.TestRule

public class KafkaJunitRule extends org.junit.rules.ExternalResource
  • Constructor Details

  • Method Details

    • 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
    • create

      public static KafkaJunitRule create()