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): String

    Permalink

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

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

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

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

    Permalink

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

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

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

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

    Permalink

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

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

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

    Definition Classes
    KafkaTestKit
  28. def createTopic(): String

    Permalink

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

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

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

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

    Permalink

    Return a unique topic name.

    Return a unique topic name.

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

    Permalink
  31. 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
  32. 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
  33. implicit val ec: ExecutionContext

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  65. def kafkaPort: Int

    Permalink
  66. def lastSender: ActorRef

    Permalink
    Definition Classes
    TestKitBase
  67. val log: Logger

    Permalink
    Definition Classes
    KafkaSpecKafkaTestKit
  68. implicit val mat: Materializer

    Permalink
  69. def msgAvailable: Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef
  73. def now: FiniteDuration

    Permalink
    Definition Classes
    TestKitBase
  74. val partition0: Int

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

    Permalink
  76. 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.

  77. 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.

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

    Permalink

    Produce batches over several topics.

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    TestKitBase
  86. def remaining: FiniteDuration

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

    Permalink
    Definition Classes
    TestKitBase
  88. def remainingOrDefault: FiniteDuration

    Permalink
    Definition Classes
    TestKitBase
  89. implicit val scheduler: Scheduler

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

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

    Permalink
  92. 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
  93. val settings: KafkaTestkitSettings

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

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

    Permalink
  96. def sleepAfterProduce: FiniteDuration

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  101. implicit val system: ActorSystem

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

    Permalink
    Definition Classes
    TestKitBase
  103. def testActorName: String

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

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

    Permalink
  106. def toString(): String

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  111. 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.

  112. 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.

  113. 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.

  114. def watch(ref: ActorRef): ActorRef

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

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

    Permalink
    Definition Classes
    TestKitBase
  117. 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