Class SharedKafkaTestResource

java.lang.Object
com.salesforce.kafka.test.AbstractKafkaTestResource<SharedKafkaTestResource>
com.salesforce.kafka.test.junit4.SharedKafkaTestResource
All Implemented Interfaces:
org.junit.rules.TestRule

public class SharedKafkaTestResource extends AbstractKafkaTestResource<SharedKafkaTestResource> implements org.junit.rules.TestRule
Creates and stands up an internal test kafka server to be shared across test cases within the same test class. Example within your Test class. @ClassRule public static final SharedKafkaTestResource sharedKafkaTestResource = new SharedKafkaTestResource(); Within your test case method: sharedKafkaTestResource.getKafkaTestServer()...
  • Constructor Details

    • SharedKafkaTestResource

      public SharedKafkaTestResource()
      Default constructor.
    • SharedKafkaTestResource

      public SharedKafkaTestResource(Properties brokerProperties)
      Constructor allowing passing additional broker properties.
      Parameters:
      brokerProperties - properties for Kafka broker.
  • Method Details

    • apply

      public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
      Specified by:
      apply in interface org.junit.rules.TestRule