Class

akka.kafka.testkit.scaladsl

KafkaSpec

Related Doc: package scaladsl

Permalink

abstract class KafkaSpec extends TestKit with KafkaTestKit

Source
KafkaSpec.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KafkaSpec
  2. KafkaTestKit
  3. TestKit
  4. TestKitBase
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KafkaSpec(kafkaPort: Int)

    Permalink
  2. new KafkaSpec(_kafkaPort: Int, zooKeeperPort: Int, actorSystem: ActorSystem)

    Permalink

Abstract Value Members

  1. abstract def bootstrapServers: String

    Permalink
    Definition Classes
    KafkaTestKit

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val DefaultKey: String

    Permalink
    Definition Classes
    KafkaTestKit
  5. implicit val adapter: LoggingAdapter

    Permalink
  6. def adminClient: AdminClient

    Permalink

    Access to the Kafka AdminClient which life

    Access to the Kafka AdminClient which life

    Definition Classes
    KafkaTestKit
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def awaitAssert[A](a: ⇒ A, max: Duration, interval: Duration): A

    Permalink
    Definition Classes
    TestKitBase
  9. def awaitCond(p: ⇒ Boolean, max: Duration, interval: Duration, message: String): Unit

    Permalink
    Definition Classes
    TestKitBase
  10. def awaitMultiple[T](d: FiniteDuration, futures: Future[T]*): Seq[T]

    Permalink
  11. def awaitProduce(futures: Future[Done]*): Unit

    Permalink
  12. def batchMessagesExpected(topics: Seq[String], batches: Int, batchSize: Int): (Seq[String], Long)

    Permalink

    Messages expected from #produceBatches generation.

  13. def childActorOf(props: Props): ActorRef

    Permalink
    Definition Classes
    TestKitBase
  14. def childActorOf(props: Props, name: String): ActorRef

    Permalink
    Definition Classes
    TestKitBase
  15. def childActorOf(props: Props, supervisorStrategy: SupervisorStrategy): ActorRef

    Permalink
    Definition Classes
    TestKitBase
  16. def childActorOf(props: Props, name: String, supervisorStrategy: SupervisorStrategy): ActorRef

    Permalink
    Definition Classes
    TestKitBase
  17. def cleanUp(): Unit

    Permalink
  18. def cleanUpAdminClient(): Unit

    Permalink

    Close internal admin client instances.

    Close internal admin client instances.

    Definition Classes
    KafkaTestKit
  19. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. def committerDefaults: CommitterSettings

    Permalink
    Definition Classes
    KafkaTestKit
  21. def consumerDefaults: ConsumerSettings[String, String]

    Permalink
    Definition Classes
    KafkaTestKit
  22. def createGroupId(suffix: Int): String

    Permalink

    Return a unique group id with a given suffix.

    Return a unique group id with a given suffix.

    Definition Classes
    KafkaTestKit
  23. def createGroupId(): String

    Permalink

    Return a unique group id with a default suffix.

    Return a unique group id with a default suffix.

    Definition Classes
    KafkaTestKit
  24. def createProbe(consumerSettings: ConsumerSettings[String, String], topic: String*): (Control, Probe[String])

    Permalink
  25. def createTopic(suffix: Int, partitions: Int, replication: Int, config: Map[String, String]): String

    Permalink

    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
  26. def createTopic(suffix: Int, partitions: Int, replication: Int, config: Map[String, String]): String

    Permalink

    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
  27. def createTopic(suffix: Int, partitions: Int, replication: Int): String

    Permalink

    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
  28. def createTopic(suffix: Int, partitions: Int): String

    Permalink

    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
  29. def createTopic(suffix: Int): String

    Permalink

    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
  30. def createTopic(): String

    Permalink

    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
  31. def createTopicName(suffix: Int): String

    Permalink

    Return a unique topic name.

    Return a unique topic name.

    Definition Classes
    KafkaTestKit
  32. def createTopics(topics: Int*): Seq[String]

    Permalink
  33. def createTransactionalId(suffix: Int): String

    Permalink

    Return a unique transactional id with a given suffix.

    Return a unique transactional id with a given suffix.

    Definition Classes
    KafkaTestKit
  34. def createTransactionalId(): String

    Permalink

    Return a unique transactional id with a default suffix.

    Return a unique transactional id with a default suffix.

    Definition Classes
    KafkaTestKit
  35. implicit val ec: ExecutionContext

    Permalink
  36. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  37. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  38. def expectMsg[T](max: FiniteDuration, hint: String, obj: T): T

    Permalink
    Definition Classes
    TestKitBase
  39. def expectMsg[T](max: FiniteDuration, obj: T): T

    Permalink
    Definition Classes
    TestKitBase
  40. def expectMsg[T](obj: T): T

    Permalink
    Definition Classes
    TestKitBase
  41. def expectMsgAllClassOf[T](max: FiniteDuration, obj: Class[_ <: T]*): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  42. def expectMsgAllClassOf[T](obj: Class[_ <: T]*): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  43. def expectMsgAllConformingOf[T](max: FiniteDuration, obj: Class[_ <: T]*): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  44. def expectMsgAllConformingOf[T](obj: Class[_ <: T]*): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  45. def expectMsgAllOf[T](max: FiniteDuration, obj: T*): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  46. def expectMsgAllOf[T](obj: T*): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  47. def expectMsgAnyClassOf[C](max: FiniteDuration, obj: Class[_ <: C]*): C

    Permalink
    Definition Classes
    TestKitBase
  48. def expectMsgAnyClassOf[C](obj: Class[_ <: C]*): C

    Permalink
    Definition Classes
    TestKitBase
  49. def expectMsgAnyOf[T](max: FiniteDuration, obj: T*): T

    Permalink
    Definition Classes
    TestKitBase
  50. def expectMsgAnyOf[T](obj: T*): T

    Permalink
    Definition Classes
    TestKitBase
  51. def expectMsgClass[C](max: FiniteDuration, c: Class[C]): C

    Permalink
    Definition Classes
    TestKitBase
  52. def expectMsgClass[C](c: Class[C]): C

    Permalink
    Definition Classes
    TestKitBase
  53. def expectMsgPF[T](max: Duration, hint: String)(f: PartialFunction[Any, T]): T

    Permalink
    Definition Classes
    TestKitBase
  54. def expectMsgType[T](max: FiniteDuration)(implicit t: ClassTag[T]): T

    Permalink
    Definition Classes
    TestKitBase
  55. def expectMsgType[T](implicit t: ClassTag[T]): T

    Permalink
    Definition Classes
    TestKitBase
  56. def expectNoMessage(): Unit

    Permalink
    Definition Classes
    TestKitBase
  57. def expectNoMessage(max: FiniteDuration): Unit

    Permalink
    Definition Classes
    TestKitBase
  58. def expectTerminated(target: ActorRef, max: Duration): Terminated

    Permalink
    Definition Classes
    TestKitBase
  59. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  60. def fishForMessage(max: Duration, hint: String)(f: PartialFunction[Any, Boolean]): Any

    Permalink
    Definition Classes
    TestKitBase
  61. def fishForSpecificMessage[T](max: Duration, hint: String)(f: PartialFunction[Any, T]): T

    Permalink
    Definition Classes
    TestKitBase
  62. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  63. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  64. def ignoreMsg(f: PartialFunction[Any, Boolean]): Unit

    Permalink
    Definition Classes
    TestKitBase
  65. def ignoreNoMsg(): Unit

    Permalink
    Definition Classes
    TestKitBase
  66. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  67. def kafkaPort: Int

    Permalink
  68. def lastSender: ActorRef

    Permalink
    Definition Classes
    TestKitBase
  69. val log: Logger

    Permalink
    Definition Classes
    KafkaSpecKafkaTestKit
  70. implicit val mat: Materializer

    Permalink
  71. def msgAvailable: Boolean

    Permalink
    Definition Classes
    TestKitBase
  72. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  73. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  74. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  75. def now: FiniteDuration

    Permalink
    Definition Classes
    TestKitBase
  76. val partition0: Int

    Permalink
  77. def periodicalCheck[T](description: String, maxTries: Int, sleepInBetween: FiniteDuration)(data: () ⇒ T)(predicate: (T) ⇒ Boolean): Unit

    Permalink
  78. def produce(topic: String, range: Range, settings: ProducerSettings[String, String]): Future[Done]

    Permalink

    Produce messages to topic using specified range and return a Future so the caller can synchronize consumption.

  79. def produce(topic: String, range: Seq[Int], partition: Int = partition0): Future[Done]

    Permalink

    Produce messages to topic using specified range and return a Future so the caller can synchronize consumption.

  80. def produceBatches(topics: Seq[String], batches: Int, batchSize: Int): Future[Seq[Done]]

    Permalink

    Produce batches over several topics.

  81. def produceString(topic: String, range: Seq[String], partition: Int = partition0): Future[Done]

    Permalink
  82. def produceTimestamped(topic: String, timestampedRange: Seq[(Int, Long)]): Future[Done]

    Permalink
  83. def producerDefaults: ProducerSettings[String, String]

    Permalink
    Definition Classes
    KafkaTestKit
  84. def receiveN(n: Int, max: FiniteDuration): Seq[AnyRef]

    Permalink
    Definition Classes
    TestKitBase
  85. def receiveN(n: Int): Seq[AnyRef]

    Permalink
    Definition Classes
    TestKitBase
  86. def receiveOne(max: Duration): AnyRef

    Permalink
    Definition Classes
    TestKitBase
  87. def receiveWhile[T](max: Duration, idle: Duration, messages: Int)(f: PartialFunction[AnyRef, T]): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  88. def remaining: FiniteDuration

    Permalink
    Definition Classes
    TestKitBase
  89. def remainingOr(duration: FiniteDuration): FiniteDuration

    Permalink
    Definition Classes
    TestKitBase
  90. def remainingOrDefault: FiniteDuration

    Permalink
    Definition Classes
    TestKitBase
  91. implicit val scheduler: Scheduler

    Permalink
  92. def setAutoPilot(pilot: AutoPilot): Unit

    Permalink
    Definition Classes
    TestKitBase
  93. def setUp(): Unit

    Permalink
  94. def setUpAdminClient(): Unit

    Permalink

    Create internal admin clients.

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

    Definition Classes
    KafkaTestKit
  95. val settings: KafkaTestkitSettings

    Permalink
    Definition Classes
    KafkaTestKit
  96. def shutdown(actorSystem: ActorSystem, duration: Duration, verifySystemShutdown: Boolean): Unit

    Permalink
    Definition Classes
    TestKitBase
  97. def sleep(time: FiniteDuration, msg: String = ""): Unit

    Permalink
  98. def sleepAfterProduce: FiniteDuration

    Permalink
  99. def sleepMillis(ms: Long, msg: String): Unit

    Permalink
    Definition Classes
    KafkaTestKit
  100. def sleepQuietly(time: FiniteDuration): Unit

    Permalink
  101. def sleepSeconds(s: Int, msg: String): Unit

    Permalink
    Definition Classes
    KafkaTestKit
  102. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  103. implicit val system: ActorSystem

    Permalink
    Definition Classes
    TestKit → TestKitBase
  104. val testActor: ActorRef

    Permalink
    Definition Classes
    TestKitBase
  105. def testActorName: String

    Permalink
    Attributes
    protected
    Definition Classes
    TestKitBase
  106. val testKitSettings: TestKitSettings

    Permalink
    Definition Classes
    TestKitBase
  107. var testProducer: Producer[String, String]

    Permalink
  108. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  109. def unwatch(ref: ActorRef): ActorRef

    Permalink
    Definition Classes
    TestKitBase
  110. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  111. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  112. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  113. def waitUntilCluster()(predicate: (DescribeClusterResult) ⇒ Boolean): Unit

    Permalink

    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.

  114. def waitUntilConsumerGroup(groupId: String)(predicate: (ConsumerGroupDescription) ⇒ Boolean): Unit

    Permalink

    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.

  115. def waitUntilConsumerSummary(groupId: String)(predicate: PartialFunction[List[MemberDescription], Boolean]): Unit

    Permalink

    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.

  116. def watch(ref: ActorRef): ActorRef

    Permalink
    Definition Classes
    TestKitBase
  117. def within[T](max: FiniteDuration)(f: ⇒ T): T

    Permalink
    Definition Classes
    TestKitBase
  118. def within[T](min: FiniteDuration, max: FiniteDuration)(f: ⇒ T): T

    Permalink
    Definition Classes
    TestKitBase
  119. val zooKeeperPort: Int

    Permalink

Deprecated Value Members

  1. def expectNoMsg(max: FiniteDuration): Unit

    Permalink
    Definition Classes
    TestKitBase
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.5) Use expectNoMessage instead

  2. def expectNoMsg(): Unit

    Permalink
    Definition Classes
    TestKitBase
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.5) Use expectNoMessage instead

Inherited from KafkaTestKit

Inherited from TestKit

Inherited from TestKitBase

Inherited from AnyRef

Inherited from Any

Ungrouped