Class ESClientYamlSuiteTestCase


  • public abstract class ESClientYamlSuiteTestCase
    extends ESRestTestCase
    Runs a suite of yaml tests shared with all the official Elasticsearch clients against against an elasticsearch cluster.
    • Field Detail

      • REST_TESTS_SUITE

        public static final java.lang.String REST_TESTS_SUITE
        Property that allows to control which REST tests get run. Supports comma separated list of tests or directories that contain tests e.g. -Dtests.rest.suite=index,get,create/10_with_id
        See Also:
        Constant Field Values
      • REST_TESTS_BLACKLIST

        public static final java.lang.String REST_TESTS_BLACKLIST
        Property that allows to blacklist some of the REST tests based on a comma separated list of globs e.g. "-Dtests.rest.blacklist=get/10_basic/*"
        See Also:
        Constant Field Values
      • REST_TESTS_BLACKLIST_ADDITIONS

        public static final java.lang.String REST_TESTS_BLACKLIST_ADDITIONS
        We use tests.rest.blacklist in build files to blacklist tests; this property enables a user to add additional blacklisted tests on top of the tests blacklisted in the build.
        See Also:
        Constant Field Values
    • Constructor Detail

    • Method Detail

      • initializeUseDefaultNumberOfShards

        public static void initializeUseDefaultNumberOfShards()
      • initAndResetContext

        public void initAndResetContext()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • closeClient

        public static void closeClient()
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • createParameters

        public static java.lang.Iterable<java.lang.Object[]> createParameters()
                                                                       throws java.lang.Exception
        Create parameters for this parameterized test. Uses the list of executable sections defined in ExecutableSection.
        Throws:
        java.lang.Exception
      • createParameters

        public static java.lang.Iterable<java.lang.Object[]> createParameters​(NamedXContentRegistry executeableSectionRegistry)
                                                                       throws java.lang.Exception
        Create parameters for this parameterized test.
        Throws:
        java.lang.Exception
      • getCatNodesVersionMasterRequestOptions

        protected RequestOptions getCatNodesVersionMasterRequestOptions()
      • test

        public void test()
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • randomizeContentType

        protected boolean randomizeContentType()
      • getClientBuilderWithSniffedHosts

        protected final RestClientBuilder getClientBuilderWithSniffedHosts()
                                                                    throws java.io.IOException
        Sniff the cluster for host metadata and return a RestClientBuilder for a client with that metadata.
        Throws:
        java.io.IOException