use of org.apache.rocketmq.store.AppendMessageResult in project rocketmq by apache.
the class SendMessageProcessorTest method testProcessRequest_FlushTimeOut.
@Test
public void testProcessRequest_FlushTimeOut() throws RemotingCommandException {
when(messageStore.putMessage(any(MessageExtBrokerInner.class))).thenReturn(new PutMessageResult(PutMessageStatus.FLUSH_DISK_TIMEOUT, new AppendMessageResult(AppendMessageStatus.UNKNOWN_ERROR)));
assertPutResult(ResponseCode.FLUSH_DISK_TIMEOUT);
}
use of org.apache.rocketmq.store.AppendMessageResult in project rocketmq by apache.
the class SendMessageProcessorTest method testProcessRequest_ServiceNotAvailable.
@Test
public void testProcessRequest_ServiceNotAvailable() throws RemotingCommandException {
when(messageStore.putMessage(any(MessageExtBrokerInner.class))).thenReturn(new PutMessageResult(PutMessageStatus.SERVICE_NOT_AVAILABLE, new AppendMessageResult(AppendMessageStatus.UNKNOWN_ERROR)));
assertPutResult(ResponseCode.SERVICE_NOT_AVAILABLE);
}
use of org.apache.rocketmq.store.AppendMessageResult in project rocketmq-rocketmq-all-4.1.0-incubating by lirenzuo.
the class SendMessageProcessorTest method testProcessRequest_PageCacheBusy.
@Test
public void testProcessRequest_PageCacheBusy() throws RemotingCommandException {
when(messageStore.putMessage(any(MessageExtBrokerInner.class))).thenReturn(new PutMessageResult(PutMessageStatus.OS_PAGECACHE_BUSY, new AppendMessageResult(AppendMessageStatus.UNKNOWN_ERROR)));
assertPutResult(ResponseCode.SYSTEM_ERROR);
}
use of org.apache.rocketmq.store.AppendMessageResult in project rocketmq-rocketmq-all-4.1.0-incubating by lirenzuo.
the class SendMessageProcessorTest method testProcessRequest_SlaveNotAvailable.
@Test
public void testProcessRequest_SlaveNotAvailable() throws RemotingCommandException {
when(messageStore.putMessage(any(MessageExtBrokerInner.class))).thenReturn(new PutMessageResult(PutMessageStatus.SLAVE_NOT_AVAILABLE, new AppendMessageResult(AppendMessageStatus.UNKNOWN_ERROR)));
assertPutResult(ResponseCode.SLAVE_NOT_AVAILABLE);
}
use of org.apache.rocketmq.store.AppendMessageResult in project rocketmq-rocketmq-all-4.1.0-incubating by lirenzuo.
the class SendMessageProcessorTest method testProcessRequest_FlushSlaveTimeout.
@Test
public void testProcessRequest_FlushSlaveTimeout() throws RemotingCommandException {
when(messageStore.putMessage(any(MessageExtBrokerInner.class))).thenReturn(new PutMessageResult(PutMessageStatus.FLUSH_SLAVE_TIMEOUT, new AppendMessageResult(AppendMessageStatus.UNKNOWN_ERROR)));
assertPutResult(ResponseCode.FLUSH_SLAVE_TIMEOUT);
}
Aggregations