Class AbstractBasicDistributedZkTestBase


  • public abstract class AbstractBasicDistributedZkTestBase
    extends AbstractFullDistribZkTestBase
    This test simply does a bunch of basic things in solrcloud mode and asserts things work as expected.
    • Constructor Detail

      • AbstractBasicDistributedZkTestBase

        public AbstractBasicDistributedZkTestBase()
    • Method Detail

      • beforeBDZKTClass

        public static void beforeBDZKTClass()
      • createCollectionInOneInstance

        public static void createCollectionInOneInstance​(org.apache.solr.client.solrj.SolrClient client,
                                                         String nodeName,
                                                         ThreadPoolExecutor executor,
                                                         String collection,
                                                         int numShards,
                                                         int numReplicas)
        Create a collection in single node
      • getBaseUrl

        protected String getBaseUrl​(org.apache.solr.client.solrj.SolrClient client)
      • indexDoc

        protected void indexDoc​(String collection,
                                org.apache.solr.common.SolrInputDocument doc)
                         throws IOException,
                                org.apache.solr.client.solrj.SolrServerException
        Throws:
        IOException
        org.apache.solr.client.solrj.SolrServerException
      • createNewSolrClient

        protected org.apache.solr.client.solrj.SolrClient createNewSolrClient​(String collection,
                                                                              String baseUrl,
                                                                              int connectionTimeoutMillis,
                                                                              int socketTimeoutMillis)
        Parameters:
        collection - the name of a collection or core to set as the "default" on the created client.
        baseUrl - the "base" URL of a Solr node. Should not contain a collection or core name.
        connectionTimeoutMillis - the HTTP connection timeout in milliseconds
        socketTimeoutMillis - the HTTP socket-read timeout in milliseconds
      • queryServer

        protected org.apache.solr.client.solrj.response.QueryResponse queryServer​(org.apache.solr.common.params.ModifiableSolrParams params)
                                                                           throws org.apache.solr.client.solrj.SolrServerException,
                                                                                  IOException
        Overrides:
        queryServer in class AbstractFullDistribZkTestBase
        Throws:
        org.apache.solr.client.solrj.SolrServerException
        IOException