Jheng-Sing Chen created KAFKA-20674:
---------------------------------------
Summary: 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
## Summary
`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`
Then reduce:
```java
Thread.sleep(20000);
```
to something shorter, for example:
```java
Thread.sleep(3000);
```
## Validation
Run the test repeatedly to make sure it does not become flaky:
```bash
./gradlew :clients:clients-integration-tests:test --tests
org.apache.kafka.clients.consumer.ShareConsumerTest.testAcquisitionLockTimeoutOnConsumer
```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)