Class ActionTestUtils

java.lang.Object
org.elasticsearch.action.support.ActionTestUtils

public class ActionTestUtils
extends java.lang.Object
  • Method Summary

    Modifier and Type Method Description
    static <T> org.elasticsearch.action.ActionListener<T> assertNoFailureListener​(org.elasticsearch.common.CheckedConsumer<T,​java.lang.Exception> consumer)  
    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.
    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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)
    • 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.common.CheckedConsumer<T,​java.lang.Exception> consumer)