Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,24 @@ import org.scalatest.junit.AssertionsForJUnit
*/
class GenericAvroScalaIntegrationTest extends AssertionsForJUnit {

private val privateCluster: EmbeddedSingleNodeKafkaCluster = new EmbeddedSingleNodeKafkaCluster

@Rule def cluster: EmbeddedSingleNodeKafkaCluster = privateCluster

private var cluster: EmbeddedSingleNodeKafkaCluster = _

private val inputTopic = "inputTopic"
private val outputTopic = "output-topic"

@Before
def startKafkaCluster() {
cluster = new EmbeddedSingleNodeKafkaCluster
cluster.start()
cluster.createTopic(inputTopic, 2, 1)
cluster.createTopic(outputTopic)
}

@After
def stopKafkaCluster(): Unit = {
cluster.stop()
}

@Test
def shouldRoundTripGenericAvroDataThroughKafka() {
val schema: Schema = new Schema.Parser().parse(getClass.getResourceAsStream("/avro/io/confluent/examples/streams/wikifeed.avsc"))
Expand Down