mirror of https://github.com/apache/kafka.git
### 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> |
||
---|---|---|
.. | ||
main/java/org/apache/kafka/coordinator/common/runtime | ||
test/java/org/apache/kafka/coordinator/common/runtime |