Skip to content

Commit

Permalink
[ISSUE apache#3624]DefaultMQPushConsumerTest.testPullMessage_Exceptio…
Browse files Browse the repository at this point in the history
…nOccursWhenComputePullFromWhere throws RejectedExecution (apache#3626)
  • Loading branch information
panzhi33 authored and 上河 committed Mar 3, 2022
1 parent 581e2e7 commit 4e582f7
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
import org.apache.rocketmq.common.protocol.header.PullMessageRequestHeader;
import org.apache.rocketmq.remoting.RPCHook;
import org.apache.rocketmq.remoting.exception.RemotingException;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
Expand All @@ -75,7 +75,6 @@
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;

Expand All @@ -90,7 +89,7 @@ public class DefaultMQPushConsumerTest {
private MQClientAPIImpl mQClientAPIImpl;
private RebalanceImpl rebalanceImpl;
private RebalancePushImpl rebalancePushImpl;
private DefaultMQPushConsumer pushConsumer;
private static DefaultMQPushConsumer pushConsumer;

@Before
public void init() throws Exception {
Expand Down Expand Up @@ -157,8 +156,8 @@ public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> msgs,
pushConsumer.start();
}

@After
public void terminate() {
@AfterClass
public static void terminate() {
pushConsumer.shutdown();
}

Expand Down

0 comments on commit 4e582f7

Please sign in to comment.