mirror of
https://github.com/pcvolkmer/etl-processor.git
synced 2025-04-19 17:26:51 +00:00
Merge pull request #59 from CCC-MF/issue_58
feat: do not use episode id in kafka record key
This commit is contained in:
commit
f751d64220
@ -94,8 +94,7 @@ class KafkaMtbFileSender(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun key(request: MtbFileSender.MtbFileRequest): String {
|
private fun key(request: MtbFileSender.MtbFileRequest): String {
|
||||||
return "{\"pid\": \"${request.mtbFile.patient.id}\", " +
|
return "{\"pid\": \"${request.mtbFile.patient.id}\"}"
|
||||||
"\"eid\": \"${request.mtbFile.episode.id}\"}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun key(request: MtbFileSender.DeleteRequest): String {
|
private fun key(request: MtbFileSender.DeleteRequest): String {
|
||||||
|
@ -101,7 +101,7 @@ class KafkaMtbFileSenderTest {
|
|||||||
val captor = argumentCaptor<String>()
|
val captor = argumentCaptor<String>()
|
||||||
verify(kafkaTemplate, times(1)).send(anyString(), captor.capture(), captor.capture())
|
verify(kafkaTemplate, times(1)).send(anyString(), captor.capture(), captor.capture())
|
||||||
assertThat(captor.firstValue).isNotNull
|
assertThat(captor.firstValue).isNotNull
|
||||||
assertThat(captor.firstValue).isEqualTo("{\"pid\": \"PID\", \"eid\": \"1\"}")
|
assertThat(captor.firstValue).isEqualTo("{\"pid\": \"PID\"}")
|
||||||
assertThat(captor.secondValue).isNotNull
|
assertThat(captor.secondValue).isNotNull
|
||||||
assertThat(captor.secondValue).isEqualTo(objectMapper.writeValueAsString(kafkaRecordData("TestID", Consent.Status.ACTIVE)))
|
assertThat(captor.secondValue).isEqualTo(objectMapper.writeValueAsString(kafkaRecordData("TestID", Consent.Status.ACTIVE)))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user