[ https://issues.apache.org/jira/browse/KAFKA-16354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17825871#comment-17825871 ]
PoAn Yang commented on KAFKA-16354: ----------------------------------- Hi [~gharris1727], it looks like not both `testCacheUpdateWaitFailsForUnreachableVersion` and `testInitFailureDueToFeatureIncompatibility` wait in CountDownLatch#await function. `testCacheUpdateWaitFailsForUnreachableVersion` waits in ZkMetadataCache#waitUntilFeatureEpochOrThrow. It gets System.nanoTime directly. We can't use a mocked latch for it. `testInitFailureDueToFeatureIncompatibility`waits with CountDownLatch. However, we may need to update FinalizedFeatureChangeListener#initOrThrow input to give a mocked latch. Do we want to do that? Thank you. > FinalizedFeatureChangeListenerTest should use mocked latches > ------------------------------------------------------------ > > Key: KAFKA-16354 > URL: https://issues.apache.org/jira/browse/KAFKA-16354 > Project: Kafka > Issue Type: Test > Components: core > Affects Versions: 3.7.0 > Reporter: Greg Harris > Priority: Trivial > Labels: newbie > > testCacheUpdateWaitFailsForUnreachableVersion takes 30 seconds, and > testInitFailureDueToFeatureIncompatibility takes 5 seconds. This appears to > be caused by FeatureCacheUpdater#awaitUpdateOrThrow waiting for a real > CountDownLatch with a real-time timeout. > Instead, a mocked latch should be used to exit the await immediately. > This should be done both for CPU-independence, and for test execution speed. -- This message was sent by Atlassian Jira (v8.20.10#820010)