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