Skip to content

Commit

Permalink
Build fixes because gw assemble doesn't build tests. ✉️
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiSernLim committed Oct 9, 2024
1 parent 03ba493 commit 4db714e
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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<PubSubTopicPartition> assignmentReturnedConsumer = new HashSet<>();
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 4db714e

Please sign in to comment.