Commit 8a81e9e0 authored by Thomas Bernhart's avatar Thomas Bernhart
Browse files

Fix integration tests

parent 10f40f28
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
*/ */
package org.memobase package org.memobase
import com.beust.klaxon.Klaxon
import java.io.File import java.io.File
import java.io.FileInputStream import java.io.FileInputStream
import java.time.Duration import java.time.Duration
...@@ -35,6 +36,7 @@ import org.apache.kafka.common.serialization.StringDeserializer ...@@ -35,6 +36,7 @@ import org.apache.kafka.common.serialization.StringDeserializer
import org.apache.kafka.common.serialization.StringSerializer import org.apache.kafka.common.serialization.StringSerializer
import org.apache.logging.log4j.LogManager 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.Assertions.assertNotNull
import org.junit.jupiter.api.TestInstance import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.api.extension.ExtendWith import org.junit.jupiter.api.extension.ExtendWith
import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.ParameterizedTest
...@@ -122,7 +124,9 @@ class ServiceTest { ...@@ -122,7 +124,9 @@ class ServiceTest {
assertThat(totalConsumerRecords) assertThat(totalConsumerRecords)
.size().isEqualTo(expectedRecordCount) .size().isEqualTo(expectedRecordCount)
assertThat(totalConsumerRecords[0].value()).isEqualTo(params.expectedIngestReports[0].toJson()) val receivedReport = Klaxon().parse<Report>(totalConsumerRecords[0].value())
assertNotNull(receivedReport)
assertThat(receivedReport).isEqualTo(params.expectedIngestReports[0])
} }
private fun kafkaTests() = Stream.of( private fun kafkaTests() = Stream.of(
......
Markdown is supported
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