[ 
https://issues.apache.org/jira/browse/KAFKA-16792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17878054#comment-17878054
 ] 

Lianet Magrans commented on KAFKA-16792:
----------------------------------------

Agree with [~chia7712] 's point, we've had this same situation and is expected 
in all these tests that basically make an api call (app thread), and check 
right after that there is a request generated. For the new consumer that does 
not happen right away: all request are generated in the background thread, once 
it's has had the time to runOnce and process the event triggered by the api 
call. So the waitForCondition seems sensible at this test level (they are 
really checking the internals, so need to deal with it). On the api 
implementations, we cover this delay and try to hide it as much as possible by 
blocking with addAndGet(event) to wait for the background to process the 
event/requests.  

> 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)

Reply via email to