Skip to content

Commit

Permalink
fix AdminBrokerProcessorTest unnecessary Mockito stubbings
Browse files Browse the repository at this point in the history
  • Loading branch information
凯铎 committed Aug 1, 2023
1 parent bec6314 commit 23eb3e8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.apache.rocketmq.broker.offset.ConsumerOffsetManager;
import org.apache.rocketmq.broker.schedule.ScheduleMessageService;
import org.apache.rocketmq.broker.topic.TopicConfigManager;
import org.apache.rocketmq.common.BoundaryType;
import org.apache.rocketmq.common.BrokerConfig;
import org.apache.rocketmq.common.MixAll;
import org.apache.rocketmq.common.TopicConfig;
Expand Down Expand Up @@ -311,7 +312,7 @@ public void testProcessRequest_UpdateConfigPath() throws RemotingCommandExceptio
@Test
public void testSearchOffsetByTimestamp() throws Exception {
messageStore = mock(MessageStore.class);
when(messageStore.getOffsetInQueueByTime(anyString(), anyInt(), anyLong())).thenReturn(Long.MIN_VALUE);
when(messageStore.getOffsetInQueueByTime(anyString(), anyInt(), anyLong(), any(BoundaryType.class))).thenReturn(Long.MIN_VALUE);
when(brokerController.getMessageStore()).thenReturn(messageStore);
SearchOffsetRequestHeader searchOffsetRequestHeader = new SearchOffsetRequestHeader();
searchOffsetRequestHeader.setTopic("topic");
Expand Down

0 comments on commit 23eb3e8

Please sign in to comment.