kafka/coordinator-common/src
Abhinav Dixit caf4a6cc5f
KAFKA-19216: Eliminate flakiness in kafka.server.share.SharePartitionTest (#19639)
### About
11 of the test cases in `SharePartitionTest` have failed at least once
in the past 28 days.

https://develocity.apache.org/scans/tests?search.relativeStartTime=P28D&search.rootProjectNames=kafka&search.timeZoneId=Europe%2FLondon&tests.container=kafka.server.share.SharePartitionTest
Observing the flakiness, they seem to be caused due to the usage of
`SystemTimer` for various acquisition lock timeout related tests. I have
replaced the usage of `SystemTimer` with `MockTimer` and also improved
the `MockTimer` API with regard to removing the timer task entries that
have already been cancelled.
Also, this has reduced the time taken to run `SharePartitionTest` from
~6 sec to ~1.5 sec

### Testing
The testing has been done with the help of already present unit tests in
Apache Kafka.

Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-05-05 20:04:22 +01:00
..
main/java/org/apache/kafka/coordinator/common/runtime MINOR: Update GroupCoordinator interface to use AuthorizableRequestContext instead of RequestContext (#19485) 2025-04-16 09:12:11 -07:00
test/java/org/apache/kafka/coordinator/common/runtime KAFKA-19216: Eliminate flakiness in kafka.server.share.SharePartitionTest (#19639) 2025-05-05 20:04:22 +01:00