rewrite-spring
rewrite-spring copied to clipboard
Switch KafkaTestUtils timeout arguments from long to Duration
KafkaTestUtils from spring-kafka provides a number of static helper methods to consume records, retrieve various record offsets, and others. Recently a number of methods switched from taking a long timeout to a Duration timeout.
-org.springframework.kafka.test.utils.KafkaTestUtils#getRecords(org.apache.kafka.clients.consumer.Consumer<K,V> consumer, long timeout)
+org.springframework.kafka.test.utils.KafkaTestUtils#getRecords(org.apache.kafka.clients.consumer.Consumer<K,V> consumer, Duration timeout)
A recipe could help migrate users of the old method argument to the new method argument type. These changes were first introduced in 2.9.3, which is also the last version to contain both methods.