Skip to content

Commit

Permalink
fix test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
GenerousMan committed Oct 26, 2023
1 parent c909a98 commit ca74b6b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import io.netty.channel.ChannelHandlerContext;
import org.apache.rocketmq.broker.BrokerController;
import org.apache.rocketmq.broker.transaction.OperationResult;
import org.apache.rocketmq.broker.transaction.TransactionMetrics;
import org.apache.rocketmq.broker.transaction.TransactionalMessageService;
import org.apache.rocketmq.common.BrokerConfig;
import org.apache.rocketmq.common.message.MessageAccessor;
Expand Down Expand Up @@ -71,8 +72,12 @@ public class EndTransactionProcessorTest {
@Mock
private TransactionalMessageService transactionMsgService;

@Mock
private TransactionMetrics transactionMetrics;

@Before
public void init() {
when(transactionMsgService.getTransactionMetrics()).thenReturn(transactionMetrics);
brokerController.setMessageStore(messageStore);
brokerController.setTransactionalMessageService(transactionMsgService);
endTransactionProcessor = new EndTransactionProcessor(brokerController);
Expand Down

0 comments on commit ca74b6b

Please sign in to comment.