Class BaseDistributedSearchTestCase
- java.lang.Object
- 
- org.junit.Assert
- 
- org.apache.lucene.tests.util.LuceneTestCase
- 
- org.apache.solr.SolrTestCase
- 
- org.apache.solr.SolrTestCaseJ4
- 
- org.apache.solr.BaseDistributedSearchTestCase
 
 
 
 
 
- 
- Direct Known Subclasses:
- AbstractDistribZkTestBase
 
 public abstract class BaseDistributedSearchTestCase extends SolrTestCaseJ4 Helper base class for distributed search test casesBy default, for Nightly runs, all tests in sub-classes will execute with 1, 2, ... DEFAULT_MAX_SHARD_COUNT number of shards set up repeatedly. For non-nightly tests, they will execute with 2 shards, to speed up total execution time. In general, it's preferable to annotate the tests in sub-classes with a @ShardsFixed(num = N) or a @ShardsRepeat(min = M, max = N) to indicate whether the test should be called once, with a fixed number of shards, or called repeatedly for number of shards = M to N. In some cases though, if the number of shards has to be fixed, but the number itself is dynamic, or if it has to be set as a default for all sub-classes of a sub-class, there's a fixShardCount(N) available, which is identical to @ShardsFixed(num = N) for all tests without annotations in that class hierarchy. Ideally this function should be retired in favour of better annotations.. - Since:
- solr 1.5
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classBaseDistributedSearchTestCase.RandDatestatic classBaseDistributedSearchTestCase.RandValstatic interfaceBaseDistributedSearchTestCase.ShardsFixedstatic interfaceBaseDistributedSearchTestCase.ShardsRepeatclassBaseDistributedSearchTestCase.ShardsRepeatRule- 
Nested classes/interfaces inherited from class org.apache.solr.SolrTestCaseJ4SolrTestCaseJ4.BVal, SolrTestCaseJ4.CloudHttp2SolrClientBuilder, SolrTestCaseJ4.CloudSolrClientBuilder, SolrTestCaseJ4.Doc, SolrTestCaseJ4.Fld, SolrTestCaseJ4.FldType, SolrTestCaseJ4.FVal, SolrTestCaseJ4.IRange, SolrTestCaseJ4.IVals, SolrTestCaseJ4.IValsPercent, SolrTestCaseJ4.SuppressPointFields, SolrTestCaseJ4.SuppressSSL, SolrTestCaseJ4.SVal, SolrTestCaseJ4.Vals, SolrTestCaseJ4.XmlDoc
 - 
Nested classes/interfaces inherited from class org.apache.lucene.tests.util.LuceneTestCaseorg.apache.lucene.tests.util.LuceneTestCase.AwaitsFix, org.apache.lucene.tests.util.LuceneTestCase.BadApple, org.apache.lucene.tests.util.LuceneTestCase.Monster, org.apache.lucene.tests.util.LuceneTestCase.Nightly, org.apache.lucene.tests.util.LuceneTestCase.SuppressCodecs, org.apache.lucene.tests.util.LuceneTestCase.SuppressFileSystems, org.apache.lucene.tests.util.LuceneTestCase.SuppressFsync, org.apache.lucene.tests.util.LuceneTestCase.SuppressReproduceLine, org.apache.lucene.tests.util.LuceneTestCase.SuppressSysoutChecks, org.apache.lucene.tests.util.LuceneTestCase.SuppressTempFileChecks, org.apache.lucene.tests.util.LuceneTestCase.ThrowingConsumer<T extends Object>, org.apache.lucene.tests.util.LuceneTestCase.ThrowingRunnable, org.apache.lucene.tests.util.LuceneTestCase.Weekly
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected List<org.apache.solr.client.solrj.SolrClient>clientsprotected Stringcontextprotected org.apache.solr.client.solrj.SolrClientcontrolClientprotected org.apache.solr.client.solrj.embedded.JettySolrRunnercontrolJettyprotected String[]deadServersprotected ExecutorServiceexecutorstatic String[]fieldNamesprotected intflagsstatic intFUZZYWhen this flag is set, Double values will be allowed a difference ratio of 1E-8 between the non-distributed and the distributed returned valuesprotected Map<String,Integer>handleprotected Stringidprotected List<org.apache.solr.client.solrj.embedded.JettySolrRunner>jettysprotected intnThreadsstatic intORDEREDstatic Randomrstatic BaseDistributedSearchTestCase.RandVal[]randValsstatic BaseDistributedSearchTestCase.RandValrdatestatic BaseDistributedSearchTestCase.RandValrdoubleBaseDistributedSearchTestCase.ShardsRepeatRulerepeatRulestatic BaseDistributedSearchTestCase.RandValrfloatstatic BaseDistributedSearchTestCase.RandValrintstatic BaseDistributedSearchTestCase.RandValrlongprotected Stringshardsprotected String[]shardsArrstatic intSKIPstatic intSKIPVALprotected intstressprotected FiletestDirstatic intUNORDEREDprotected booleanuseExplicitNodeNamesprotected booleanverifyStress- 
Fields inherited from class org.apache.solr.SolrTestCaseJ4configString, CORE_PROPERTIES_FILENAME, coreName, DEAD_HOST_1, DEAD_HOST_2, DEAD_HOST_3, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_TEST_COLLECTION_NAME, DEFAULT_TEST_CORENAME, h, hdfsDataDir, initCoreDataDir, lrf, NUMERIC_DOCVALUES_SYSPROP, NUMERIC_POINTS_SYSPROP, ONE_ONE, RANDOMIZED_NUMERIC_FIELDTYPES, schemaString, solrConfig, solrTestRules, sslConfig, SYSTEM_PROPERTY_SOLR_TESTS_MERGEPOLICYFACTORY, TEST_URL_ALLOW_LIST, testExecutor, testSolrHome, UPDATELOG_SYSPROP, USE_NUMERIC_POINTS_SYSPROP, ZERO_ONE, ZERO_TWO
 - 
Fields inherited from class org.apache.solr.SolrTestCasesolrClassRules
 - 
Fields inherited from class org.apache.lucene.tests.util.LuceneTestCaseassertsAreEnabled, classRules, DEFAULT_LINE_DOCS_FILE, INFOSTREAM, JENKINS_LARGE_LINE_DOCS_FILE, LEAVE_TEMPORARY, MAYBE_CACHE_POLICY, RANDOM_MULTIPLIER, ruleChain, suiteFailureMarker, SYSPROP_AWAITSFIX, SYSPROP_BADAPPLES, SYSPROP_FAILFAST, SYSPROP_MAXFAILURES, SYSPROP_MONSTER, SYSPROP_NIGHTLY, SYSPROP_WEEKLY, TEST_ASSERTS_ENABLED, TEST_AWAITSFIX, TEST_BADAPPLES, TEST_CODEC, TEST_DIRECTORY, TEST_DOCVALUESFORMAT, TEST_LINE_DOCS_FILE, TEST_MONSTER, TEST_NIGHTLY, TEST_POSTINGSFORMAT, TEST_THROTTLING, TEST_WEEKLY, VERBOSE
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedBaseDistributedSearchTestCase()Constructs a test in which the jetty+solr instances as well as the solr clients all use the value of the "hostContext" system property.protectedBaseDistributedSearchTestCase(String context)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.solr.client.solrj.response.UpdateResponseadd(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params, Iterable<org.apache.solr.common.SolrInputDocument> sdocs)protected org.apache.solr.client.solrj.response.UpdateResponseadd(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params, org.apache.solr.common.SolrInputDocument sdoc)This should not be called in a loop, useadd(SolrClient, SolrParams, Iterable)insteadprotected static voidaddFields(org.apache.solr.common.SolrInputDocument doc, Object... fields)protected org.apache.solr.common.SolrInputDocumentaddRandFields(org.apache.solr.common.SolrInputDocument sdoc)protected StringbuildUrl(int port)static voidclearHostContext()Clears the "hostContext" system propertystatic voidclearSolrDisableShardsWhitelist()protected voidcommit()static Stringcompare(Object[] a, Object[] b, int flags, Map<String,Integer> handle)static Stringcompare(Object a, Object b, int flags, Map<String,Integer> handle)static Stringcompare(Map a, Map b, int flags, Map<String,Integer> handle)static Stringcompare(org.apache.solr.common.SolrDocumentList a, org.apache.solr.common.SolrDocumentList b, int flags, Map<String,Integer> handle)static Stringcompare(org.apache.solr.common.SolrDocument a, org.apache.solr.common.SolrDocument b, int flags, Map<String,Integer> handle)static Stringcompare(org.apache.solr.common.util.NamedList a, org.apache.solr.common.util.NamedList b, int flags, Map<String,Integer> handle)static Stringcompare1(Map a, Map b, int flags, Map<String,Integer> handle)protected voidcompareResponses(org.apache.solr.client.solrj.response.QueryResponse a, org.apache.solr.client.solrj.response.QueryResponse b)protected voidcompareSolrResponses(org.apache.solr.client.solrj.SolrResponse a, org.apache.solr.client.solrj.SolrResponse b)protected org.apache.solr.client.solrj.embedded.JettySolrRunnercreateControlJetty()org.apache.solr.client.solrj.embedded.JettySolrRunnercreateJetty(File solrHome, String dataDir)org.apache.solr.client.solrj.embedded.JettySolrRunnercreateJetty(File solrHome, String dataDir, String shardId)org.apache.solr.client.solrj.embedded.JettySolrRunnercreateJetty(File solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride)org.apache.solr.client.solrj.embedded.JettySolrRunnercreateJetty(File solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride, boolean explicitCoreNodeName)protected org.apache.solr.client.solrj.SolrClientcreateNewSolrClient(int port)protected org.apache.solr.common.params.ModifiableSolrParamscreateParams(Object... q)protected voidcreateServers(int numShards)protected voiddel(String q)protected org.apache.solr.client.solrj.response.UpdateResponsedel(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params, Object... ids)protected org.apache.solr.client.solrj.response.UpdateResponsedelQ(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params, String... queries)protected voiddestroyServers()voiddistribSetUp()voiddistribTearDown()voidfixShardCount(int count)static intflags(Map<String,Integer> handle, Object key)SortedMap<Class<? extends javax.servlet.Filter>,String>getExtraRequestFilters()Override this method to insert extra filters into the JettySolrRunners that are created using createJetty()SortedMap<org.eclipse.jetty.servlet.ServletHolder,String>getExtraServlets()Override this method to insert extra servlets into the JettySolrRunners that are created using createJetty()protected String[]getFieldNames()static Object[]getRandFields(String[] fields, BaseDistributedSearchTestCase.RandVal[] randVals)protected BaseDistributedSearchTestCase.RandVal[]getRandValues()intgetShardCount()protected StringgetShardsString()StringgetSolrHome()Subclasses can override this to change a test's solr home (default is in test-files)protected StringgetSolrXml()protected voidindex(Object... fields)protected voidindex_specific(int serverNumber, Object... fields)protected voidindexDoc(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params, org.apache.solr.common.SolrInputDocument doc)protected voidindexDoc(org.apache.solr.common.SolrInputDocument doc)Indexes the document in both the control client, and a randomly selected clientvoidindexDocs(Iterator<org.apache.solr.common.SolrInputDocument> docs)Indexes the stream of documents in both the control client and randomly selected clients (per batch)protected org.apache.solr.client.solrj.response.UpdateResponseindexDocs(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params, Iterable<org.apache.solr.common.SolrInputDocument> sdocs)Indexes the document in both the control client and the specified client asserting that the responses are equivalentprotected voidindexr(Object... fields)static voidinitHostContext()Set's the value of the "hostContext" system property to a random path like string (which may or may not contain sub-paths).static voidinitialize()protected org.apache.solr.client.solrj.response.QueryResponsequery(boolean setDistribParams, Object[] q)Returns the QueryResponse fromqueryServer(org.apache.solr.common.params.ModifiableSolrParams)protected org.apache.solr.client.solrj.response.QueryResponsequery(boolean setDistribParams, org.apache.solr.common.params.SolrParams p)Returns the QueryResponse fromqueryServer(org.apache.solr.common.params.ModifiableSolrParams)protected org.apache.solr.client.solrj.response.QueryResponsequery(Object... q)Sets distributed params.protected org.apache.solr.client.solrj.response.QueryResponsequery(org.apache.solr.common.params.SolrParams params)Sets distributed params.org.apache.solr.client.solrj.response.QueryResponsequeryAndCompare(org.apache.solr.common.params.SolrParams params, Iterable<org.apache.solr.client.solrj.SolrClient> clients)org.apache.solr.client.solrj.response.QueryResponsequeryAndCompare(org.apache.solr.common.params.SolrParams params, org.apache.solr.client.solrj.SolrClient... clients)protected org.apache.solr.client.solrj.response.QueryResponsequeryServer(org.apache.solr.common.params.ModifiableSolrParams params)protected voidseedSolrHome(File jettyHome)Given a directory that will be used as the SOLR_HOME for a jetty instance, seeds that directory with the contents ofgetSolrHome()and ensures that the propergetSolrXml()file is in place.protected voidsetDistributedParams(org.apache.solr.common.params.ModifiableSolrParams params)static voidsetSolrDisableShardsWhitelist()protected voidsetupJettySolrHome(File jettyHome)voidvalidateControlData(org.apache.solr.client.solrj.response.QueryResponse control)Implementations can pre-test the control data for basic correctness before using it as a check for the shard data.- 
Methods inherited from class org.apache.solr.SolrTestCaseJ4add, addAndGetVersion, addDoc, adoc, adoc, assertExceptionThrownWithMessageContaining, assertFailedU, assertFailedU, assertFieldValues, assertJQ, assertJQ, assertNonBlockingRandomGeneratorAvailable, assertQ, assertQ, assertQEx, assertQEx, assertQEx, assertResponseValues, assertSolrInputFieldEquals, assertU, assertU, assertXmlFile, assumeWorkingMockito, buildJettyConfig, buildUrl, clearIndex, commit, compareSolrDocument, compareSolrDocumentList, compareSolrInputDocument, configset, copyMinConf, copyMinConf, copyMinConf, copyMinFullSetup, copySolrHomeToTemp, copyXmlToHome, createComparator, createComparator, createCore, createCoreContainer, createCoreContainer, createCoreContainer, createDefaultCoreContainer, createDistributedUpdateProcessor, createDoc, createSort, deleteAndGetVersion, deleteByQueryAndGetVersion, deleteCore, delI, delQ, doc, getClassName, getCloudHttp2SolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getCloudSolrClient, getConcurrentUpdateSolrClient, getConcurrentUpdateSolrClient, getConcurrentUpdateSolrClient, getFile, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getLBHttpSolrClient, getLBHttpSolrClient, getLBHttpSolrClient, getRootCause, getSaferTestName, getSchemaFile, getSimpleClassName, getSolrConfigFile, getWrappedException, hasInitException, hasInitException, ignoreException, indexDocs, initAndGetDataDir, initClassLogLevels, initCore, initCore, initCore, initCore, initMethodLogLevels, invertField, isSSLMode, JQ, json, json, json, jsonAdd, jsonDelId, jsonDelQ, map, map, newCloudSolrClient, newRandomConfig, optimize, params, pickRandom, postSetUp, preTearDown, randomDate, randomSkewedDate, randomXmlUsableUnicodeString, req, req, req, resetExceptionIgnores, resetFactory, resetGlobalTracer, restoreMethodLogLevels, sdoc, sdocs, sdocWithChildren, sdocWithChildren, sdocWithChildren, setUp, setupNoCoreTest, setupTestCases, skewed, startTrackingSearchers, systemClearPropertySolrDisableUrlAllowList, systemClearPropertySolrTestsMergePolicyFactory, systemSetPropertySolrDisableUrlAllowList, systemSetPropertySolrTestsMergePolicyFactory, tearDown, teardownTestCases, TEST_COLL1_CONF, TEST_HOME, TEST_PATH, toJSON, unIgnoreException, updateJ, useFactory, waitForWarming, waitForWarming, whitespaceMockTokenizer, whitespaceMockTokenizer, writeCoreProperties, writeCoreProperties
 - 
Methods inherited from class org.apache.solr.SolrTestCaseafterSolrTestCase, beforeSolrTestCase, checkSyspropForceBeforeAssumptionFailure, checkSyspropForceBeforeClassAssumptionFailure
 - 
Methods inherited from class org.apache.lucene.tests.util.LuceneTestCaseaddVirusChecker, assertDeletedDocsEquals, assertDocsAndPositionsEnumEquals, assertDocsEnumEquals, assertDocsSkippingEquals, assertDocValuesEquals, assertDocValuesEquals, assertFieldInfosEquals, assertNormsEquals, assertPointsEquals, assertPositionsSkippingEquals, assertReaderEquals, assertReaderStatisticsEquals, assertStoredFieldEquals, assertStoredFieldsEquals, assertTermsEnumEquals, assertTermsEquals, assertTermsEquals, assertTermsStatisticsEquals, assertTermStatsEquals, assertTermVectorsEquals, asSet, assumeFalse, assumeNoException, assumeTrue, assumeWorkingMMapOnWindows, atLeast, atLeast, callStackContains, callStackContains, callStackContainsAnyOf, closeAfterSuite, closeAfterTest, collate, createTempDir, createTempDir, createTempFile, createTempFile, dumpArray, dumpIterator, ensureSaneIWCOnNightly, expectThrows, expectThrows, expectThrows, expectThrowsAnyOf, expectThrowsAnyOf, getDataInputStream, getDataPath, getJvmForkArguments, getOnlyLeafReader, getTestClass, getTestName, hasWorkingMMapOnWindows, isTestThread, localeForLanguageTag, maybeChangeLiveIndexWriterConfig, maybeWrapReader, newAlcoholicMergePolicy, newAlcoholicMergePolicy, newBytesRef, newBytesRef, newBytesRef, newBytesRef, newBytesRef, newBytesRef, newDirectory, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newIndexWriterConfig, newIOContext, newIOContext, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newMaybeVirusCheckingDirectory, newMaybeVirusCheckingFSDirectory, newMergePolicy, newMergePolicy, newMergePolicy, newMockDirectory, newMockDirectory, newMockDirectory, newMockFSDirectory, newMockFSDirectory, newSearcher, newSearcher, newSearcher, newSearcher, newStringField, newStringField, newStringField, newStringField, newTextField, newTextField, newTieredMergePolicy, newTieredMergePolicy, overrideDefaultQueryCache, overrideTestDefaultQueryCache, random, randomLocale, randomTimeZone, rarely, rarely, replaceMaxFailureRule, resetDefaultQueryCache, restoreCPUCoreCount, restoreIndexWriterMaxDocs, runWithRestrictedPermissions, setIndexWriterMaxDocs, setupCPUCoreCount, slowFileExists, usually, usually, wrapReader
 - 
Methods inherited from class org.junit.AssertassertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertThrows, assertThrows, assertTrue, assertTrue, fail, fail
 
- 
 
- 
- 
- 
Field Detail- 
executorprotected ExecutorService executor 
 - 
rpublic static Random r 
 - 
useExplicitNodeNamesprotected boolean useExplicitNodeNames 
 - 
controlJettyprotected volatile org.apache.solr.client.solrj.embedded.JettySolrRunner controlJetty 
 - 
clientsprotected final List<org.apache.solr.client.solrj.SolrClient> clients 
 - 
jettysprotected final List<org.apache.solr.client.solrj.embedded.JettySolrRunner> jettys 
 - 
contextprotected volatile String context 
 - 
deadServersprotected volatile String[] deadServers 
 - 
shardsprotected volatile String shards 
 - 
shardsArrprotected volatile String[] shardsArr 
 - 
testDirprotected volatile File testDir 
 - 
controlClientprotected volatile org.apache.solr.client.solrj.SolrClient controlClient 
 - 
stressprotected volatile int stress 
 - 
verifyStressprotected volatile boolean verifyStress 
 - 
nThreadsprotected volatile int nThreads 
 - 
ORDEREDpublic static final int ORDERED - See Also:
- Constant Field Values
 
 - 
SKIPpublic static final int SKIP - See Also:
- Constant Field Values
 
 - 
SKIPVALpublic static final int SKIPVAL - See Also:
- Constant Field Values
 
 - 
UNORDEREDpublic static final int UNORDERED - See Also:
- Constant Field Values
 
 - 
FUZZYpublic static int FUZZY When this flag is set, Double values will be allowed a difference ratio of 1E-8 between the non-distributed and the distributed returned values
 - 
flagsprotected volatile int flags 
 - 
idprotected String id 
 - 
rintpublic static BaseDistributedSearchTestCase.RandVal rint 
 - 
rlongpublic static BaseDistributedSearchTestCase.RandVal rlong 
 - 
rfloatpublic static BaseDistributedSearchTestCase.RandVal rfloat 
 - 
rdoublepublic static BaseDistributedSearchTestCase.RandVal rdouble 
 - 
rdatepublic static BaseDistributedSearchTestCase.RandVal rdate 
 - 
fieldNamespublic static String[] fieldNames 
 - 
randValspublic static BaseDistributedSearchTestCase.RandVal[] randVals 
 - 
repeatRulepublic BaseDistributedSearchTestCase.ShardsRepeatRule repeatRule 
 
- 
 - 
Constructor Detail- 
BaseDistributedSearchTestCaseprotected BaseDistributedSearchTestCase() Constructs a test in which the jetty+solr instances as well as the solr clients all use the value of the "hostContext" system property.If the system property is not set, or is set to the empty string (neither of which should normally happen unless a subclass explicitly modifies the property set by initHostContext()prior to calling this constructor) a servlet context of "/solr" is used. (this is for consistency with the default behavior of solr.xml parsing when usinghostContext="${hostContext:}"If the system property is set to a value which does not begin with a "/" (which should normally happen unless a subclass explicitly modifies the property set by initHostContext()prior to calling this constructor) a leading "/" will be prepended.- See Also:
- initHostContext()
 
 - 
BaseDistributedSearchTestCaseprotected BaseDistributedSearchTestCase(String context) - Parameters:
- context- explicit servlet context path to use (eg: "/solr")
 
 
- 
 - 
Method Detail- 
initializepublic static void initialize() 
 - 
initHostContextpublic static void initHostContext() Set's the value of the "hostContext" system property to a random path like string (which may or may not contain sub-paths). This is used in the default constructor for this test to help ensure no code paths have hardcoded assumptions about the servlet context used to run solr.Test configs may use the ${hostContext}variable to access this system property.
 - 
clearHostContextpublic static void clearHostContext() throws ExceptionClears the "hostContext" system property- Throws:
- Exception
- See Also:
- initHostContext()
 
 - 
setSolrDisableShardsWhitelistpublic static void setSolrDisableShardsWhitelist() throws Exception- Throws:
- Exception
 
 - 
clearSolrDisableShardsWhitelistpublic static void clearSolrDisableShardsWhitelist() throws Exception- Throws:
- Exception
 
 - 
getShardCountpublic int getShardCount() 
 - 
fixShardCountpublic void fixShardCount(int count) 
 - 
getFieldNamesprotected String[] getFieldNames() 
 - 
getRandValuesprotected BaseDistributedSearchTestCase.RandVal[] getRandValues() 
 - 
getSolrHomepublic String getSolrHome() Subclasses can override this to change a test's solr home (default is in test-files)
 - 
createControlJettyprotected org.apache.solr.client.solrj.embedded.JettySolrRunner createControlJetty() throws Exception- Throws:
- Exception
 
 - 
setDistributedParamsprotected void setDistributedParams(org.apache.solr.common.params.ModifiableSolrParams params) 
 - 
getShardsStringprotected String getShardsString() 
 - 
createJettypublic org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(File solrHome, String dataDir) throws Exception - Throws:
- Exception
 
 - 
createJettypublic org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(File solrHome, String dataDir, String shardId) throws Exception - Throws:
- Exception
 
 - 
createJettypublic org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(File solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride) throws Exception - Throws:
- Exception
 
 - 
createJettypublic org.apache.solr.client.solrj.embedded.JettySolrRunner createJetty(File solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride, boolean explicitCoreNodeName) throws Exception - Throws:
- Exception
 
 - 
getExtraServletspublic SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> getExtraServlets() Override this method to insert extra servlets into the JettySolrRunners that are created using createJetty()
 - 
getExtraRequestFilterspublic SortedMap<Class<? extends javax.servlet.Filter>,String> getExtraRequestFilters() Override this method to insert extra filters into the JettySolrRunners that are created using createJetty()
 - 
createNewSolrClientprotected org.apache.solr.client.solrj.SolrClient createNewSolrClient(int port) 
 - 
buildUrlprotected String buildUrl(int port) 
 - 
addFieldsprotected static void addFields(org.apache.solr.common.SolrInputDocument doc, Object... fields)
 - 
addRandFieldsprotected org.apache.solr.common.SolrInputDocument addRandFields(org.apache.solr.common.SolrInputDocument sdoc) 
 - 
indexDocprotected void indexDoc(org.apache.solr.common.SolrInputDocument doc) throws IOException, org.apache.solr.client.solrj.SolrServerExceptionIndexes the document in both the control client, and a randomly selected client- Throws:
- IOException
- org.apache.solr.client.solrj.SolrServerException
 
 - 
indexDocprotected void indexDoc(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params, org.apache.solr.common.SolrInputDocument doc) throws IOException, org.apache.solr.client.solrj.SolrServerException- Throws:
- IOException
- org.apache.solr.client.solrj.SolrServerException
 
 - 
indexDocspublic void indexDocs(Iterator<org.apache.solr.common.SolrInputDocument> docs) throws org.apache.solr.client.solrj.SolrServerException, IOException Indexes the stream of documents in both the control client and randomly selected clients (per batch)- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
 - 
indexDocsprotected org.apache.solr.client.solrj.response.UpdateResponse indexDocs(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params, Iterable<org.apache.solr.common.SolrInputDocument> sdocs) throws IOException, org.apache.solr.client.solrj.SolrServerExceptionIndexes the document in both the control client and the specified client asserting that the responses are equivalent- Throws:
- IOException
- org.apache.solr.client.solrj.SolrServerException
 
 - 
addprotected org.apache.solr.client.solrj.response.UpdateResponse add(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params, org.apache.solr.common.SolrInputDocument sdoc) throws IOException, org.apache.solr.client.solrj.SolrServerExceptionThis should not be called in a loop, useadd(SolrClient, SolrParams, Iterable)instead- Throws:
- IOException
- org.apache.solr.client.solrj.SolrServerException
 
 - 
addprotected org.apache.solr.client.solrj.response.UpdateResponse add(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params, Iterable<org.apache.solr.common.SolrInputDocument> sdocs) throws IOException, org.apache.solr.client.solrj.SolrServerException- Throws:
- IOException
- org.apache.solr.client.solrj.SolrServerException
 
 - 
delprotected org.apache.solr.client.solrj.response.UpdateResponse del(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params, Object... ids) throws IOException, org.apache.solr.client.solrj.SolrServerException- Throws:
- IOException
- org.apache.solr.client.solrj.SolrServerException
 
 - 
delQprotected org.apache.solr.client.solrj.response.UpdateResponse delQ(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params, String... queries) throws IOException, org.apache.solr.client.solrj.SolrServerException- Throws:
- IOException
- org.apache.solr.client.solrj.SolrServerException
 
 - 
index_specificprotected void index_specific(int serverNumber, Object... fields) throws Exception- Throws:
- Exception
 
 - 
queryServerprotected org.apache.solr.client.solrj.response.QueryResponse queryServer(org.apache.solr.common.params.ModifiableSolrParams params) throws org.apache.solr.client.solrj.SolrServerException, IOException- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
 - 
queryprotected org.apache.solr.client.solrj.response.QueryResponse query(Object... q) throws Exception Sets distributed params. Returns the QueryResponse fromqueryServer(org.apache.solr.common.params.ModifiableSolrParams),- Throws:
- Exception
 
 - 
queryprotected org.apache.solr.client.solrj.response.QueryResponse query(org.apache.solr.common.params.SolrParams params) throws ExceptionSets distributed params. Returns the QueryResponse fromqueryServer(org.apache.solr.common.params.ModifiableSolrParams),- Throws:
- Exception
 
 - 
queryprotected org.apache.solr.client.solrj.response.QueryResponse query(boolean setDistribParams, Object[] q) throws ExceptionReturns the QueryResponse fromqueryServer(org.apache.solr.common.params.ModifiableSolrParams)- Throws:
- Exception
 
 - 
queryprotected org.apache.solr.client.solrj.response.QueryResponse query(boolean setDistribParams, org.apache.solr.common.params.SolrParams p) throws ExceptionReturns the QueryResponse fromqueryServer(org.apache.solr.common.params.ModifiableSolrParams)- Throws:
- Exception
 
 - 
queryAndComparepublic org.apache.solr.client.solrj.response.QueryResponse queryAndCompare(org.apache.solr.common.params.SolrParams params, org.apache.solr.client.solrj.SolrClient... clients) throws org.apache.solr.client.solrj.SolrServerException, IOException- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
 - 
queryAndComparepublic org.apache.solr.client.solrj.response.QueryResponse queryAndCompare(org.apache.solr.common.params.SolrParams params, Iterable<org.apache.solr.client.solrj.SolrClient> clients) throws org.apache.solr.client.solrj.SolrServerException, IOException- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
 - 
comparepublic static String compare(org.apache.solr.common.util.NamedList a, org.apache.solr.common.util.NamedList b, int flags, Map<String,Integer> handle) 
 - 
comparepublic static String compare(org.apache.solr.common.SolrDocument a, org.apache.solr.common.SolrDocument b, int flags, Map<String,Integer> handle) 
 - 
comparepublic static String compare(org.apache.solr.common.SolrDocumentList a, org.apache.solr.common.SolrDocumentList b, int flags, Map<String,Integer> handle) 
 - 
comparepublic static String compare(Object[] a, Object[] b, int flags, Map<String,Integer> handle) 
 - 
compareSolrResponsesprotected void compareSolrResponses(org.apache.solr.client.solrj.SolrResponse a, org.apache.solr.client.solrj.SolrResponse b)
 - 
compareResponsesprotected void compareResponses(org.apache.solr.client.solrj.response.QueryResponse a, org.apache.solr.client.solrj.response.QueryResponse b)
 - 
getRandFieldspublic static Object[] getRandFields(String[] fields, BaseDistributedSearchTestCase.RandVal[] randVals) 
 - 
validateControlDatapublic void validateControlData(org.apache.solr.client.solrj.response.QueryResponse control) throws ExceptionImplementations can pre-test the control data for basic correctness before using it as a check for the shard data. This is useful, for instance, if a test bug is introduced causing a spelling index not to get built: both control & shard data would have no results but because they match the test would pass. This method gives us a chance to ensure something exists in the control data.- Throws:
- Exception
 
 - 
getSolrXmlprotected String getSolrXml() 
 - 
seedSolrHomeprotected void seedSolrHome(File jettyHome) throws IOException Given a directory that will be used as the SOLR_HOME for a jetty instance, seeds that directory with the contents ofgetSolrHome()and ensures that the propergetSolrXml()file is in place.- Throws:
- IOException
 
 - 
setupJettySolrHomeprotected void setupJettySolrHome(File jettyHome) throws IOException - Throws:
- IOException
 
 - 
createParamsprotected org.apache.solr.common.params.ModifiableSolrParams createParams(Object... q) 
 
- 
 
-