Commit d8530dab authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Update integration tests & remove unnecessary local variable

parent df7388f6
...@@ -35,11 +35,8 @@ class Service(file: String = "app.yml") { ...@@ -35,11 +35,8 @@ class Service(file: String = "app.yml") {
file, file,
useStreamsConfig = true useStreamsConfig = true
) )
private val builder = KafkaTopology(settings).prepare()
fun run() { fun run() {
val stream = KafkaStreams(KafkaTopology(settings).prepare().build(), settings.kafkaStreamsSettings)
val stream = KafkaStreams(builder.build(), settings.kafkaStreamsSettings)
stream.use { stream.use {
it.start() it.start()
while (stream.state().isRunning) { while (stream.state().isRunning) {
......
...@@ -27,7 +27,6 @@ import org.apache.kafka.common.serialization.StringDeserializer ...@@ -27,7 +27,6 @@ import org.apache.kafka.common.serialization.StringDeserializer
import org.apache.kafka.common.serialization.StringSerializer import org.apache.kafka.common.serialization.StringSerializer
import org.apache.kafka.streams.TopologyTestDriver import org.apache.kafka.streams.TopologyTestDriver
import org.apache.kafka.streams.test.ConsumerRecordFactory import org.apache.kafka.streams.test.ConsumerRecordFactory
import org.apache.logging.log4j.LogManager
import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.TestInstance import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.ParameterizedTest
...@@ -41,7 +40,6 @@ import java.util.stream.Stream ...@@ -41,7 +40,6 @@ import java.util.stream.Stream
@TestInstance(TestInstance.Lifecycle.PER_CLASS) @TestInstance(TestInstance.Lifecycle.PER_CLASS)
class IntegrationTests { class IntegrationTests {
private val log = LogManager.getLogger("TestLogger")
private val resourcePath = "src/test/resources" private val resourcePath = "src/test/resources"
private fun readFile(fileName: String): String { private fun readFile(fileName: String): String {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment