[
https://issues.apache.org/jira/browse/KAFKA-17779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17892435#comment-17892435
]
Kamal Chandraprakash commented on KAFKA-17779:
----------------------------------------------
[~mingdaoy]
Are you working on this test? We may have to refactor the test to avoid reusing
the mocked objects.
> Fix flaky
> RemoteLogManagerTest#testFetchOffsetByTimestampWithTieredStorageDoesNotFetchIndexWhenExistsLocally
> ------------------------------------------------------------------------------------------------------------
>
> Key: KAFKA-17779
> URL: https://issues.apache.org/jira/browse/KAFKA-17779
> Project: Kafka
> Issue Type: Test
> Reporter: Chia-Ping Tsai
> Assignee: Mingdao Yang
> Priority: Minor
>
> ```
> org.mockito.exceptions.misusing.WrongTypeOfReturnValue:
> SingletonList cannot be returned by leaderEpochCache()
> leaderEpochCache() should return Option
> ***
> If you're unsure why you're getting above error read on.
> Due to the nature of the syntax above problem might occur because:
> 1. This exception might occur in wrongly written multi-threaded tests.
> Please refer to Mockito FAQ on limitations of concurrency testing.
> 2. A spy is stubbed using when(spy.foo()).then() syntax. It is safer to stub
> spies -
> - with doReturn
> ```
> https://github.com/apache/kafka/actions/runs/11295770598/attempts/1#summary-31419257288
--
This message was sent by Atlassian Jira
(v8.20.10#820010)