use of org.apache.rocketmq.client.hook.SendMessageContext in project rocketmq by apache.
the class MQClientAPIImplTest method testSendMessageOneWay_Success.
@Test
public void testSendMessageOneWay_Success() throws RemotingException, InterruptedException, MQBrokerException {
doNothing().when(remotingClient).invokeOneway(anyString(), any(RemotingCommand.class), anyLong());
SendResult sendResult = mqClientAPI.sendMessage(brokerAddr, brokerName, msg, new SendMessageRequestHeader(), 3 * 1000, CommunicationMode.ONEWAY, new SendMessageContext(), defaultMQProducerImpl);
assertThat(sendResult).isNull();
}
Aggregations