[
https://issues.apache.org/jira/browse/KAFKA-16792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17875883#comment-17875883
]
PoAn Yang commented on KAFKA-16792:
-----------------------------------
Hi [~lianetm] and [~kirktrue], I did some investigation of testCurrentLag and
testListOffsetShouldUpdateSubscriptions. Both these tests fail in `
client.respond(FindCoordinatorResponse.prepareResponse(...))`.
In `ClassicKafkaConsumer#poll`, it always sends `FindCoordinatorRequest`.
However, in `AsyncKafkaConsumer`, it sends `FindCoordinatorRequest` in
`CoordinatorRequestManager` and uses `ConsumerNetworkThread` to trigger the
request. The `ConsumerNetworkThread` is in different thread, so we don't
guarantee `AsyncKafkaConsumer#poll` always sends `FindCoordinatorRequest`.
My question is that can we just add `TestUtils#waitForCondition` to wait if
there is `FindCoordinatorRequest` in `MockClient`? Or we want to align behavior
between ClassicKafkaConsumer and AsyncKafkaConsumer? Aligning behavior may need
some refactor.
> Enable consumer unit tests that fail to fetch offsets only for new consumer
> with poll(0)
> ----------------------------------------------------------------------------------------
>
> Key: KAFKA-16792
> URL: https://issues.apache.org/jira/browse/KAFKA-16792
> Project: Kafka
> Issue Type: Test
> Components: clients, consumer, unit tests
> Reporter: Lianet Magrans
> Assignee: PoAn Yang
> Priority: Blocker
> Labels: kip-848-client-support
> Fix For: 4.0.0
>
>
> Enable the following unit tests for the new async consumer in
> KafkaConsumerTest:
> - testCurrentLag
> - testFetchStableOffsetThrowInPoll
> - testListOffsetShouldUpdateSubscriptions
> - testPollReturnsRecords
> - testResetToCommittedOffset
> - testResetUsingAutoResetPolicy
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)