Fix MessageSourceTest for the latest spring-kafka

Related to: https://github.com/spring-projects/spring-kafka/issues/1659
This commit is contained in:
Artem Bilan
2020-12-21 17:31:45 -05:00
parent 7e66509682
commit ad57c6187a

View File

@@ -591,7 +591,7 @@ class MessageSourceTests {
captor = ArgumentCaptor.forClass(LogMessage.class);
inOrder.verify(log2).warn(captor.capture());
assertThat(captor.getValue().toString())
.contains("Cannot commit offset for ConsumerRecord")
.contains("Cannot commit offset for")
.contains("; an earlier offset was rolled back");
inOrder.verify(consumer).poll(any(Duration.class));
inOrder.verify(consumer).commitSync(Collections.singletonMap(topicPartition, new OffsetAndMetadata(1L)));