提交 b91b95bd 编写于 作者: X xxxxx

feat(test) remove unnessary stub

上级 bc55a654
......@@ -53,31 +53,6 @@ public class DefaultMQPushConsumerImplTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Before
public void setUp() throws Exception {
when(defaultMQPushConsumer.getConsumerGroup()).thenReturn("test_group");
when(defaultMQPushConsumer.getMessageModel()).thenReturn(MessageModel.CLUSTERING);
when(defaultMQPushConsumer.getConsumeFromWhere()).thenReturn(ConsumeFromWhere.CONSUME_FROM_FIRST_OFFSET);
when(defaultMQPushConsumer.getConsumeTimestamp()).thenReturn(UtilAll.timeMillisToHumanString3(System.currentTimeMillis() - (1000 * 60 * 30)));
when(defaultMQPushConsumer.getAllocateMessageQueueStrategy()).thenReturn(new AllocateMessageQueueAveragely());
when(defaultMQPushConsumer.getConsumeThreadMin()).thenReturn(20);
when(defaultMQPushConsumer.getConsumeThreadMax()).thenReturn(30);
when(defaultMQPushConsumer.getConsumeConcurrentlyMaxSpan()).thenReturn(2000);
when(defaultMQPushConsumer.getPullThresholdForQueue()).thenReturn(1000);
when(defaultMQPushConsumer.getPullThresholdForTopic()).thenReturn(-1);
when(defaultMQPushConsumer.getPullThresholdSizeForQueue()).thenReturn(100);
when(defaultMQPushConsumer.getPullThresholdSizeForTopic()).thenReturn(-1);
when(defaultMQPushConsumer.getConsumeMessageBatchMaxSize()).thenReturn(1);
when(defaultMQPushConsumer.getPullBatchSize()).thenReturn(32);
when(defaultMQPushConsumer.getPopInvisibleTime()).thenReturn(60000L);
when(defaultMQPushConsumer.getPopBatchNums()).thenReturn(32);
when(defaultMQPushConsumer.getClientIP()).thenReturn("127.0.0.1");
when(defaultMQPushConsumer.getInstanceName()).thenReturn("test_instance");
when(defaultMQPushConsumer.buildMQClientId()).thenCallRealMethod();
ClientConfig clientConfig = new ClientConfig();
when(defaultMQPushConsumer.cloneClientConfig()).thenReturn(clientConfig);
when(defaultMQPushConsumer.getConsumeTimeout()).thenReturn(15L);
}
@Test
public void checkConfigTest() throws MQClientException {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册