Lianet Magrans created KAFKA-20315:
--------------------------------------
Summary: Add test for single in-flight poll event logic in
async/share consumer
Key: KAFKA-20315
URL: https://issues.apache.org/jira/browse/KAFKA-20315
Project: Kafka
Issue Type: Test
Components: clients, consumer
Reporter: Lianet Magrans
The async and share consumer send a single poll event to the background when
there is a call to consumer.poll. Even though there may be continuous calls to
poll (triggered internally from the do-while within consumer.poll, or
externally if the app continously calls consumer.poll), the intention is to not
generate a new poll event as long as the inflight hasn't completed or expired.
New event created here only:
https://github.com/apache/kafka/blob/2f2d9b0172ec6bfee6d332ff8b7cd39f2660a964/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java#L903
Seems there is no unit test coverage for inflight management, which should be
helpful to catch regressions (if by mistake we revert to sending too many poll
events).
Found this test gap while reviewing the changes for ShareConsumer
https://github.com/apache/kafka/pull/21757#pullrequestreview-3954153888
--
This message was sent by Atlassian Jira
(v8.20.10#820010)