use of org.graylog2.indexer.messages.IndexingRequest in project graylog2-server by Graylog2.
the class MessagesAdapterES6Test method bulkIndexReturnsEmptyListIfSuccessful.
@Test
void bulkIndexReturnsEmptyListIfSuccessful() throws Exception {
final BulkResult jestResult = mock(BulkResult.class);
when(jestResult.isSucceeded()).thenReturn(true);
when(jestClient.execute(any())).thenReturn(jestResult);
final List<IndexingRequest> messageList = messageListWith(messageWithId("some-message"));
final List<Messages.IndexingError> indexingErrors = messagesAdapter.bulkIndex(messageList);
assertThat(indexingErrors).isEmpty();
}
Aggregations