diff --git a/clients/da-vinci-client/src/test/java/com/linkedin/davinci/kafka/consumer/SharedKafkaConsumerTest.java b/clients/da-vinci-client/src/test/java/com/linkedin/davinci/kafka/consumer/SharedKafkaConsumerTest.java index 5a188836f4..fd97a216ef 100644 --- a/clients/da-vinci-client/src/test/java/com/linkedin/davinci/kafka/consumer/SharedKafkaConsumerTest.java +++ b/clients/da-vinci-client/src/test/java/com/linkedin/davinci/kafka/consumer/SharedKafkaConsumerTest.java @@ -1,6 +1,5 @@ package com.linkedin.davinci.kafka.consumer; -import static org.mockito.Mockito.anyInt; import static org.mockito.Mockito.anyLong; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; @@ -50,7 +49,7 @@ public void setUp() { public void testSubscriptionEmptyPoll() { PubSubTopic nonExistingTopic1 = pubSubTopicRepository.getTopic("nonExistingTopic1_v3"); - final int timeoutMs = KafkaConsumerService.SHUTDOWN_WAIT_AFTER_UNSUBSCRIBE_TIMEOUT_MS; + final long timeoutMs = KafkaConsumerService.SHUTDOWN_WAIT_AFTER_UNSUBSCRIBE_TIMEOUT_MS; SharedKafkaConsumer sharedConsumer = new SharedKafkaConsumer(consumer, stats, timeoutMs, () -> {}, (c, tp) -> {}); Set assignmentReturnedConsumer = new HashSet<>(); @@ -100,7 +99,6 @@ public void testWaitAfterUnsubscribe() { sharedKafkaConsumer.setWaitAfterUnsubscribeTimeoutMs((int) TimeUnit.SECONDS.toMillis(1)); sharedKafkaConsumer.unSubscribeAction(supplier, KafkaConsumerService.SHUTDOWN_WAIT_AFTER_UNSUBSCRIBE_TIMEOUT_MS); - verify(stats, times(1)).recordTotalWaitAfterUnsubscribeLatency(anyInt()); // This is to test that if the poll time is not incremented when the consumer is unsubscribed the correct log can // be found in the logs. Assert.assertEquals(poolTimesBeforeUnsubscribe, sharedKafkaConsumer.getPollTimes());