[ 
https://issues.apache.org/jira/browse/KAFKA-20674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jheng-Sing Chen resolved KAFKA-20674.
-------------------------------------
    Resolution: Fixed

> Speed up ShareConsumerTest.testAcquisitionLockTimeoutOnConsumer
> ---------------------------------------------------------------
>
>                 Key: KAFKA-20674
>                 URL: https://issues.apache.org/jira/browse/KAFKA-20674
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Jheng-Sing Chen
>            Assignee: Jheng-Sing Chen
>            Priority: Minor
>
> ShareConsumerTest.testAcquisitionLockTimeoutOnConsumer currently sleeps for 
> 20 seconds to wait for the share consumer acquisition lock to expire.
> This is slow because the test class configures 
> group.share.record.lock.duration.ms=15000.
> Proposed fix:
>  * Override the broker-side lock duration for this specific test:
>  ** `group.share.min.record.lock.duration.ms=1000`
>  ** `group.share.record.lock.duration.ms=1000`
>  * Reduce `Thread.sleep(20000)` to something shorter, for example 
> Thread.sleep(3000).
>  * Run the test repeatedly to make sure it does not become flaky:
> {code:bash}
> ./gradlew :clients:clients-integration-tests:test --tests 
> org.apache.kafka.clients.consumer.ShareConsumerTest.testAcquisitionLockTimeoutOnConsumer
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to