package test
- Alphabetic
- Public
- All
Type Members
-
abstract
class
AbstractKafkaStreamsFeatureTest extends Test with EmbeddedKafka
Extensible abstract test class that provides helper methods to create and access the kafka topics used in testing.
- case class FinatraTopologyTester extends Logging with Product with Serializable
- trait IteratorWithAutoCloseToSeq extends AnyRef
-
abstract
class
KafkaStreamsFeatureTest extends AbstractKafkaStreamsFeatureTest with KafkaFeatureTest
Extensible abstract test class used when testing a single KafkaStreamsTwitterServer in your test.
-
abstract
class
KafkaStreamsMultiServerFeatureTest extends AbstractKafkaStreamsFeatureTest
Extensible abstract test class used when testing multiple KafkaStreamsTwitterServers in your test.
-
trait
TimeTraveler extends AnyRef
Helper class to modify the timestamps that will be used in FinatraStreams tests.
-
abstract
class
TopologyFeatureTest extends Test
Extensible abstract test class used when testing your KafkaStreams topology using the FinatraTopologyTester.
Extensible abstract test class used when testing your KafkaStreams topology using the FinatraTopologyTester.
Example usage:
class WordCountServerTopologyFeatureTest extends TopologyFeatureTest { override val topologyTester = FinatraTopologyTester( kafkaApplicationId = "wordcount-prod-bob", server = new WordCountRocksDbServer, startingWallClockTime = new DateTime("2018-01-01T00:00:00Z") ) private val textLinesTopic = topologyTester.topic("TextLinesTopic", Serdes.ByteArray(), Serdes.String) private val wordsWithCountsTopic = topologyTester.topic("WordsWithCountsTopic", Serdes.String, ScalaSerdes.Long) test("word count test 1") { val countsStore = topologyTester.getKeyValueStore[String, Long]("CountsStore") textLinesTopic.pipeInput(Array.emptyByteArray, "Hello World Hello") wordsWithCountsTopic.assertOutput("Hello", 1) wordsWithCountsTopic.assertOutput("World", 1) wordsWithCountsTopic.assertOutput("Hello", 2) countsStore.get("Hello") should equal(2) countsStore.get("World") should equal(1) } test("word count test 2") { val countsStore = topologyTester.getKeyValueStore[String, Long]("CountsStore") textLinesTopic.pipeInput(Array.emptyByteArray, "yo yo yo") wordsWithCountsTopic.assertOutput("yo", 1) wordsWithCountsTopic.assertOutput("yo", 2) wordsWithCountsTopic.assertOutput("yo", 3) countsStore.get("yo") should equal(3) } }
-
class
TopologyTesterTopic[K, V] extends Matchers
Used to read/write from Kafka topics in the topology tester.
Used to read/write from Kafka topics in the topology tester.
- K
the type of the key
- V
the type of the value
Value Members
- object FinatraTopologyTester extends Serializable
- object TestDirectoryUtils extends Logging