Packages

c

akka.kafka.testkit.javadsl

TestcontainersKafkaJunit4Test

abstract class TestcontainersKafkaJunit4Test extends KafkaJunit4Test

JUnit 4 base class using Testcontainers to start a Kafka broker in a Docker container. The Kafka broker will be kept around across multiple test classes, unless stopKafka() is called.

The Testcontainers dependency has to be added explicitly.

Source
TestcontainersKafkaJunit4Test.java
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TestcontainersKafkaJunit4Test
  2. KafkaJunit4Test
  3. BaseKafkaTest
  4. KafkaTestKitClass
  5. KafkaTestKit
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TestcontainersKafkaJunit4Test(system: ActorSystem, materializer: Materializer, settings: KafkaTestkitTestcontainersSettings)
    Attributes
    protected[javadsl]
  2. new TestcontainersKafkaJunit4Test(system: ActorSystem, materializer: Materializer)
    Attributes
    protected[javadsl]
  3. new TestcontainersKafkaJunit4Test(system: ActorSystem, materializer: Materializer, confluentPlatformVersion: String)

    Attributes
    protected[javadsl]
    Deprecated

    Use constructor with testcontainersSettings instead. since 2.0.0

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val DefaultKey: String
    Definition Classes
    KafkaTestKit
  5. def adminClient: AdminClient

    Access to the Kafka AdminClient which life

    Access to the Kafka AdminClient which life

    Definition Classes
    KafkaTestKit
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val bootstrapServers: String
    Definition Classes
    KafkaTestKitClassKafkaTestKit
  8. def checkForStageLeaks(): Unit
    Definition Classes
    KafkaJunit4Test
  9. def cleanUpAdmin(): Unit
    Definition Classes
    KafkaJunit4Test
  10. def cleanUpAdminClient(): Unit

    Close internal admin client instances.

    Close internal admin client instances.

    Definition Classes
    TestcontainersKafkaJunit4TestKafkaTestKit
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  12. def committerDefaults: CommitterSettings
    Definition Classes
    KafkaTestKit
  13. def consumeString(topic: String, take: Long): DrainingControl[List[ConsumerRecord[String, String]]]
    Attributes
    protected[javadsl]
    Definition Classes
    BaseKafkaTest
  14. def consumerDefaults: ConsumerSettings[String, String]
    Definition Classes
    KafkaTestKit
  15. def createGroupId(suffix: Int): String

    Return a unique group id with a given suffix.

    Return a unique group id with a given suffix.

    Definition Classes
    KafkaTestKit
  16. def createGroupId(): String

    Return a unique group id with a default suffix.

    Return a unique group id with a default suffix.

    Definition Classes
    KafkaTestKit
  17. def createTopic(suffix: Int, partitions: Int, replication: Int, config: Map[String, String]): String

    Java Api

    Java Api

    Create a topic with given suffix, partition number, replication factor, and topic configuration.

    This method will block and return only when the topic has been successfully created.

    Definition Classes
    KafkaTestKit
  18. def createTopic(suffix: Int, partitions: Int, replication: Int, config: Map[String, String]): String

    Create a topic with given suffix, partition number, replication factor, and topic configuration.

    Create a topic with given suffix, partition number, replication factor, and topic configuration.

    This method will block and return only when the topic has been successfully created.

    Definition Classes
    KafkaTestKit
  19. def createTopic(suffix: Int, partitions: Int, replication: Int): String

    Create a topic with given suffix, partition number, replication factor, and no topic configuration.

    Create a topic with given suffix, partition number, replication factor, and no topic configuration.

    This method will block and return only when the topic has been successfully created.

    Definition Classes
    KafkaTestKit
  20. def createTopic(suffix: Int, partitions: Int): String

    Create a topic with a given suffix, partition number, a replication factor of one, and no topic configuration.

    Create a topic with a given suffix, partition number, a replication factor of one, and no topic configuration.

    This method will block and return only when the topic has been successfully created.

    Definition Classes
    KafkaTestKit
  21. def createTopic(suffix: Int): String

    Create a topic with a given suffix, single partitions, a replication factor of one, and no topic configuration.

    Create a topic with a given suffix, single partitions, a replication factor of one, and no topic configuration.

    This method will block and return only when the topic has been successfully created.

    Definition Classes
    KafkaTestKit
  22. def createTopic(): String

    Create a topic with a default suffix, single partition, a replication factor of one, and no topic configuration.

    Create a topic with a default suffix, single partition, a replication factor of one, and no topic configuration.

    This method will block and return only when the topic has been successfully created.

    Definition Classes
    KafkaTestKit
  23. def createTopicName(suffix: Int): String

    Return a unique topic name.

    Return a unique topic name.

    Definition Classes
    KafkaTestKit
  24. def createTransactionalId(suffix: Int): String

    Return a unique transactional id with a given suffix.

    Return a unique transactional id with a given suffix.

    Definition Classes
    KafkaTestKit
  25. def createTransactionalId(): String

    Return a unique transactional id with a default suffix.

    Return a unique transactional id with a default suffix.

    Definition Classes
    KafkaTestKit
  26. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  28. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. def log(): Logger
    Definition Classes
    BaseKafkaTestKafkaTestKit
  32. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  35. def produceString(topic: String, messageCount: Int, partition: Int): CompletionStage[Done]
    Attributes
    protected[javadsl]
    Definition Classes
    BaseKafkaTest
  36. def producerDefaults: ProducerSettings[String, String]
    Definition Classes
    KafkaTestKit
  37. def resultOf[T](stage: CompletionStage[T], timeout: Duration): T
    Attributes
    protected[javadsl]
    Definition Classes
    BaseKafkaTest
  38. def resultOf[T](stage: CompletionStage[T]): T
    Attributes
    protected[javadsl]
    Definition Classes
    BaseKafkaTest
  39. def resultOfTimeout(): Duration

    Overwrite to set different default timeout for resultOf.

    Overwrite to set different default timeout for resultOf.

    Attributes
    protected[javadsl]
    Definition Classes
    BaseKafkaTest
  40. def setUpAdmin(): Unit
    Definition Classes
    KafkaJunit4Test
  41. def setUpAdminClient(): Unit

    Create internal admin clients.

    Create internal admin clients. Gives access to adminClient, be sure to call cleanUpAdminClient after the tests are done.

    Definition Classes
    TestcontainersKafkaJunit4TestKafkaTestKit
  42. val settings: KafkaTestkitSettings
    Definition Classes
    KafkaTestKit
  43. def sleepMillis(ms: Long, msg: String): Unit
    Definition Classes
    KafkaTestKit
  44. def sleepSeconds(s: Int, msg: String): Unit
    Definition Classes
    KafkaTestKit
  45. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  46. val system: ActorSystem
    Definition Classes
    KafkaTestKitClassKafkaTestKit
  47. def toString(): String
    Definition Classes
    AnyRef → Any
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. def waitUntilCluster(predicate: Predicate[DescribeClusterResult]): Unit

    Periodically checks if a given predicate on cluster state holds.

    Periodically checks if a given predicate on cluster state holds.

    If the predicate does not hold after configured amount of time, throws an exception.

    Definition Classes
    BaseKafkaTest
  52. def waitUntilConsumerGroup(groupId: String, predicate: Predicate[ConsumerGroupDescription]): Unit

    Periodically checks if the given predicate on consumer group state holds.

    Periodically checks if the given predicate on consumer group state holds.

    If the predicate does not hold after configured amount of time, throws an exception.

    Definition Classes
    BaseKafkaTest
  53. def waitUntilConsumerSummary(groupId: String, predicate: Predicate[Collection[MemberDescription]]): Unit

    Periodically checks if the given predicate on consumer summary holds.

    Periodically checks if the given predicate on consumer summary holds.

    If the predicate does not hold after configured amount of time, throws an exception.

    Definition Classes
    BaseKafkaTest

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from KafkaJunit4Test

Inherited from BaseKafkaTest

Inherited from KafkaTestKitClass

Inherited from KafkaTestKit

Inherited from AnyRef

Inherited from Any

Ungrouped