Use unique Kafka consumer groups in tests

so, it doesn't cause unexpected rebalances in the global shared embedded Kafka broker
This commit is contained in:
Artem Bilan
2022-10-06 10:50:01 -04:00
parent 6b31d970de
commit a667171c4f

View File

@@ -328,7 +328,7 @@ class KafkaDslKotlinTests {
private fun replyContainer(): GenericMessageListenerContainer<Int, String> {
val containerProperties = ContainerProperties(TEST_TOPIC5)
containerProperties.setGroupId("outGate")
containerProperties.setGroupId("kotlinOutGate")
containerProperties.setConsumerRebalanceListener(object : ConsumerRebalanceListener {
override fun onPartitionsRevoked(partitions: Collection<TopicPartition>) {
@@ -352,7 +352,7 @@ class KafkaDslKotlinTests {
private fun containerProperties() =
ContainerProperties(TEST_TOPIC4)
.also {
it.setGroupId("inGateGroup")
it.setGroupId("kotlinInGateGroup")
}
}