autocommit reset earliest fixes race condition
Fixes `org.apache.kafka.streams.integration.utils.IntegrationTestUtils#readKeyValues` potentially starting to `poll` for stream output after the stream finished sending the test data and hence missing it when working with `latest` offsets.
Author: Armin Braun
Reviewers: Eno Thereska, Matthias J. Sax, Guozhang Wang
Closes from original-brownbear/KAFKA-5124
@@ -112,6 +112,7 @@ public class KTableKTableJoinIntegrationTest {
CONSUMER_CONFIG.put(ConsumerConfig.GROUP_ID_CONFIG, "ktable-ktable-consumer");
CONSUMER_CONFIG.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
CONSUMER_CONFIG.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
+ CONSUMER_CONFIG.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
}
@Before
@@ -218,7 +219,6 @@ public class KTableKTableJoinIntegrationTest {
streams = prepareTopology(joinType1, joinType2);
streams.start();
-
final List<KeyValue<String, String>> result = IntegrationTestUtils.waitUntilMinKeyValueRecordsReceived(
CONSUMER_CONFIG,
OUTPUT,
