Package org.elasticsearch.action.support
Class ActionTestUtils
java.lang.Object
org.elasticsearch.action.support.ActionTestUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> org.elasticsearch.action.ActionListener<T>
assertNoFailureListener
(org.elasticsearch.core.CheckedConsumer<T, Exception> consumer) static <Request extends org.elasticsearch.action.ActionRequest,
Response extends org.elasticsearch.action.ActionResponse>
voidexecute
(org.elasticsearch.action.support.TransportAction<Request, Response> action, org.elasticsearch.tasks.Task task, Request request, org.elasticsearch.action.ActionListener<Response> listener) Executes the given action.static <Request extends org.elasticsearch.action.ActionRequest,
Response extends org.elasticsearch.action.ActionResponse>
ResponseexecuteBlocking
(org.elasticsearch.action.support.TransportAction<Request, Response> action, Request request) static <Request extends org.elasticsearch.action.ActionRequest,
Response extends org.elasticsearch.action.ActionResponse>
ResponseexecuteBlockingWithTask
(org.elasticsearch.tasks.TaskManager taskManager, org.elasticsearch.transport.Transport.Connection localConnection, org.elasticsearch.action.support.TransportAction<Request, Response> action, Request request) static org.elasticsearch.client.ResponseListener
wrapAsRestResponseListener
(org.elasticsearch.action.ActionListener<org.elasticsearch.client.Response> listener)
-
Method Details
-
executeBlocking
public static <Request extends org.elasticsearch.action.ActionRequest,Response extends org.elasticsearch.action.ActionResponse> Response executeBlocking(org.elasticsearch.action.support.TransportAction<Request, Response> action, Request request) -
executeBlockingWithTask
public static <Request extends org.elasticsearch.action.ActionRequest,Response extends org.elasticsearch.action.ActionResponse> Response executeBlockingWithTask(org.elasticsearch.tasks.TaskManager taskManager, org.elasticsearch.transport.Transport.Connection localConnection, org.elasticsearch.action.support.TransportAction<Request, Response> action, Request request) -
execute
public static <Request extends org.elasticsearch.action.ActionRequest,Response extends org.elasticsearch.action.ActionResponse> void execute(org.elasticsearch.action.support.TransportAction<Request, Response> action, org.elasticsearch.tasks.Task task, Request request, org.elasticsearch.action.ActionListener<Response> listener) Executes the given action. This is a shim method to make execution publicly available in tests. -
assertNoFailureListener
public static <T> org.elasticsearch.action.ActionListener<T> assertNoFailureListener(org.elasticsearch.core.CheckedConsumer<T, Exception> consumer) -
wrapAsRestResponseListener
public static org.elasticsearch.client.ResponseListener wrapAsRestResponseListener(org.elasticsearch.action.ActionListener<org.elasticsearch.client.Response> listener)
-