Class BaseDistributedSearchTestCase
- Direct Known Subclasses:
AbstractFullDistribZkTestBase
By 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 Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic @interfacestatic @interfaceclassNested classes/interfaces inherited from class org.apache.solr.SolrTestCaseJ4
SolrTestCaseJ4.BVal, SolrTestCaseJ4.Doc, SolrTestCaseJ4.Fld, SolrTestCaseJ4.FldType, SolrTestCaseJ4.FVal, SolrTestCaseJ4.IRange, SolrTestCaseJ4.IVals, SolrTestCaseJ4.IValsPercent, SolrTestCaseJ4.RandomizingCloudHttp2SolrClientBuilder, SolrTestCaseJ4.RandomizingCloudSolrClientBuilder, SolrTestCaseJ4.SuppressPointFields, SolrTestCaseJ4.SuppressSSL, SolrTestCaseJ4.SVal, SolrTestCaseJ4.Vals, SolrTestCaseJ4.XmlDocNested classes/interfaces inherited from class org.apache.lucene.tests.util.LuceneTestCase
org.apache.lucene.tests.util.LuceneTestCase.AwaitsFix, org.apache.lucene.tests.util.LuceneTestCase.Concurrency, 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>, org.apache.lucene.tests.util.LuceneTestCase.ThrowingRunnable, org.apache.lucene.tests.util.LuceneTestCase.Weekly -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<org.apache.solr.client.solrj.SolrClient> protected org.apache.solr.client.solrj.SolrClientprotected JettySolrRunnerprotected String[]protected ExecutorServicestatic String[]protected intstatic intWhen this flag is set, Double values will be allowed a difference ratio of 1E-8 between the non-distributed and the distributed returned valuesprotected Stringprotected final List<JettySolrRunner> protected intstatic final intstatic Randomprotected Stringprotected String[]static final intstatic final intprotected intprotected Pathstatic final intprotected booleanprotected booleanFields inherited from class org.apache.solr.SolrTestCaseJ4
configString, CORE_PROPERTIES_FILENAME, coreName, DEAD_HOST_1, DEAD_HOST_2, DEAD_HOST_3, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_TEST_COLLECTION_NAME, DEFAULT_TEST_CORENAME, h, 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_TWOFields inherited from class org.apache.solr.SolrTestCase
methodRules, solrClassRulesFields inherited from class org.apache.lucene.tests.util.LuceneTestCase
assertsAreEnabled, classRules, DEFAULT_LINE_DOCS_FILE, INFOSTREAM, JENKINS_LARGE_LINE_DOCS_FILE, LEAVE_TEMPORARY, MAYBE_CACHE_POLICY, RANDOM_MULTIPLIER, ruleChain, suiteFailureMarker, SYSPROP_AWAITSFIX, SYSPROP_FAILFAST, SYSPROP_MAXFAILURES, SYSPROP_MONSTER, SYSPROP_NIGHTLY, SYSPROP_WEEKLY, TEST_ASSERTS_ENABLED, TEST_AWAITSFIX, TEST_CODEC, TEST_DIRECTORY, TEST_DOCVALUESFORMAT, TEST_LINE_DOCS_FILE, TEST_MONSTER, TEST_NIGHTLY, TEST_POSTINGSFORMAT, TEST_THROTTLING, TEST_WEEKLY, VERBOSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 voidprotected org.apache.solr.common.SolrInputDocumentaddRandFields(org.apache.solr.common.SolrInputDocument sdoc) static voidprotected voidcommit()static Stringstatic Stringstatic Stringstatic 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 Stringprotected 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 JettySolrRunnercreateJetty(Path solrHome, String dataDir) createJetty(Path solrHome, String dataDir, String shardId) createJetty(Path solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride) createJetty(Path 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 voidprotected 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 voidvoidvoidvoidfixShardCount(int count) static intOverride this method to insert extra filters into the JettySolrRunners that are created using createJetty()Override this method to insert extra servlets into the JettySolrRunners that are created using createJetty()protected String[]static Object[]getRandFields(String[] fields, BaseDistributedSearchTestCase.RandVal[] randVals) protected BaseDistributedSearchTestCase.RandVal[]intprotected StringSubclasses can override this to change a test's solr home (default is in test-files)protected Stringprotected voidprotected 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 clientvoidIndexes 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 voidstatic voidprotected org.apache.solr.client.solrj.response.QueryResponseReturns the distributed QueryResponseprotected org.apache.solr.client.solrj.response.QueryResponsequery(boolean setDistribParams, org.apache.solr.common.params.SolrParams p) Returns the distributed QueryResponseprotected org.apache.solr.client.solrj.response.QueryResponseSets 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.QueryResponsequeryRandomShard(org.apache.solr.common.params.ModifiableSolrParams params) Queries a random shard; nothing more.protected voidseedSolrHome(Path 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 voidprotected voidsetupJettySolrHome(Path 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.SolrTestCaseJ4
add, addAndGetVersion, addDoc, adoc, adoc, assertExceptionThrownWithMessageContaining, assertFailedU, assertFailedU, assertFieldValues, assertJQ, assertJQ, assertNonBlockingRandomGeneratorAvailable, assertQ, assertQ, assertQEx, assertQEx, assertQEx, assertResponseValues, assertSolrInputFieldEquals, assertThatJQ, assertThatJQ, assertU, assertU, assertXmlFile, assumeWorkingMockito, 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, getFile, getHttpClient, getHttpSolrClient, getHttpSolrClient, getHttpSolrClient, getRootCause, getSaferTestName, getSchemaFile, getSimpleClassName, getSolrConfigFile, getWrappedException, hasInitException, hasInitException, ignoreException, indexDocs, initAndGetDataDir, initCore, initCore, initCore, initCore, invertField, isSSLMode, JQ, json, json, json, jsonAdd, jsonDelId, jsonDelQ, legacyExampleCollection1SolrHome, map, map, newRandomConfig, optimize, params, pickRandom, postSetUp, preTearDown, randomDate, randomSkewedDate, randomXmlUsableUnicodeString, req, req, req, resetExceptionIgnores, resetFactory, sdoc, sdocs, sdocWithChildren, sdocWithChildren, sdocWithChildren, setUp, setupNoCoreTest, setupTestCases, skewed, startTrackingSearchers, systemClearPropertySolrEnableUrlAllowList, systemClearPropertySolrTestsMergePolicyFactory, systemSetPropertyEnableUrlAllowList, systemSetPropertySolrTestsMergePolicyFactory, tearDown, teardownTestCases, TEST_COLL1_CONF, TEST_HOME, TEST_PATH, toJSON, unIgnoreException, updateJ, useFactory, waitForWarming, waitForWarming, whitespaceMockTokenizer, whitespaceMockTokenizer, writeCoreProperties, writeCorePropertiesMethods inherited from class org.apache.solr.SolrTestCase
afterClassShutdownLogging, assertJSONEquals, assertThat, assertThat, beforeSolrTestCase, checkSyspropForceBeforeAssumptionFailure, checkSyspropForceBeforeClassAssumptionFailureMethods inherited from class org.apache.lucene.tests.util.LuceneTestCase
addVirusChecker, assertDeletedDocsEquals, assertDocsAndPositionsEnumEquals, assertDocsEnumEquals, assertDocsSkippingEquals, assertDocValuesEquals, assertDocValuesEquals, assertDoubleUlpEquals, assertFieldInfosEquals, assertFloatUlpEquals, assertNormsEquals, assertPointsEquals, assertPositionsSkippingEquals, assertReaderEquals, assertReaderStatisticsEquals, assertStoredFieldEquals, assertStoredFieldsEquals, assertTermsEnumEquals, assertTermsEquals, assertTermsEquals, assertTermsStatisticsEquals, assertTermStatsEquals, assertTermVectorsEquals, asSet, assumeFalse, assumeNoException, assumeTrue, 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, 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, newSearcher, newSnapshotIndexWriterConfig, newStringField, newStringField, newStringField, newStringField, newTextField, newTextField, newTieredMergePolicy, newTieredMergePolicy, overrideDefaultQueryCache, overrideTestDefaultQueryCache, random, randomLocale, randomTimeZone, randomVectorFormat, rarely, rarely, replaceMaxFailureRule, resetDefaultQueryCache, restoreCPUCoreCount, restoreIndexWriterMaxDocs, runWithRestrictedPermissions, setIndexWriterMaxDocs, setupCPUCoreCount, setUpExecutorService, shutdownExecutorService, slowFileExists, usually, usually, wrapReaderMethods inherited from class org.junit.Assert
assertArrayEquals, 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, assertThrows, assertThrows, assertTrue, assertTrue, fail, fail
-
Field Details
-
executor
-
r
-
useExplicitNodeNames
protected boolean useExplicitNodeNames -
controlJetty
-
clients
-
jettys
-
deadServers
-
shards
-
shardsArr
-
testDir
-
controlClient
protected volatile org.apache.solr.client.solrj.SolrClient controlClient -
stress
protected volatile int stress -
verifyStress
protected volatile boolean verifyStress -
nThreads
protected volatile int nThreads -
ORDERED
public static final int ORDERED- See Also:
-
SKIP
public static final int SKIP- See Also:
-
SKIPVAL
public static final int SKIPVAL- See Also:
-
UNORDERED
public static final int UNORDERED- See Also:
-
FUZZY
public static int FUZZYWhen this flag is set, Double values will be allowed a difference ratio of 1E-8 between the non-distributed and the distributed returned values -
flags
protected volatile int flags -
handle
-
id
-
rint
-
rlong
-
rfloat
-
rdouble
-
rdate
-
fieldNames
-
randVals
-
repeatRule
-
-
Constructor Details
-
BaseDistributedSearchTestCase
protected BaseDistributedSearchTestCase()
-
-
Method Details
-
initialize
public static void initialize() -
setSolrEnableUrlUrlAllowList
- Throws:
Exception
-
clearSolrEnableUrlUrlAllowList
- Throws:
Exception
-
getShardCount
public int getShardCount() -
fixShardCount
public void fixShardCount(int count) -
getFieldNames
-
getRandValues
-
getSolrHome
Subclasses can override this to change a test's solr home (default is in test-files) -
distribSetUp
- Throws:
Exception
-
distribTearDown
- Throws:
Exception
-
createControlJetty
- Throws:
Exception
-
createServers
- Throws:
Exception
-
setDistributedParams
protected void setDistributedParams(org.apache.solr.common.params.ModifiableSolrParams params) -
getShardsString
-
destroyServers
- Throws:
Exception
-
createJetty
- Throws:
Exception
-
createJetty
- Throws:
Exception
-
createJetty
public JettySolrRunner createJetty(Path solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride) throws Exception - Throws:
Exception
-
createJetty
public JettySolrRunner createJetty(Path solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride, boolean explicitCoreNodeName) throws Exception - Throws:
Exception
-
getExtraServlets
Override this method to insert extra servlets into the JettySolrRunners that are created using createJetty() -
getExtraRequestFilters
Override this method to insert extra filters into the JettySolrRunners that are created using createJetty() -
createNewSolrClient
protected org.apache.solr.client.solrj.SolrClient createNewSolrClient(int port) -
addFields
-
indexr
- Throws:
Exception
-
addRandFields
protected org.apache.solr.common.SolrInputDocument addRandFields(org.apache.solr.common.SolrInputDocument sdoc) -
index
- Throws:
Exception
-
indexDoc
protected void indexDoc(org.apache.solr.common.SolrInputDocument doc) throws IOException, org.apache.solr.client.solrj.SolrServerException Indexes the document in both the control client, and a randomly selected client- Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
indexDoc
protected 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:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
indexDocs
public 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.SolrServerExceptionIOException
-
indexDocs
protected 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.SolrServerException Indexes the document in both the control client and the specified client asserting that the responses are equivalent- Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
add
protected 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.SolrServerException This should not be called in a loop, useadd(SolrClient, SolrParams, Iterable)instead- Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
add
protected 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:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
del
protected 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:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
delQ
protected 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:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
index_specific
- Throws:
Exception
-
del
- Throws:
Exception
-
commit
- Throws:
Exception
-
queryRandomShard
protected org.apache.solr.client.solrj.response.QueryResponse queryRandomShard(org.apache.solr.common.params.ModifiableSolrParams params) throws org.apache.solr.client.solrj.SolrServerException, IOException Queries a random shard; nothing more.WARNING: tests should generally not call this as it doesn't compare to the control client
- Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOException
-
query
Sets distributed params. Returns the distributed QueryResponse- Throws:
Exception
-
query
protected org.apache.solr.client.solrj.response.QueryResponse query(org.apache.solr.common.params.SolrParams params) throws Exception Sets distributed params. Returns the distributed QueryResponse- Throws:
Exception
-
query
protected org.apache.solr.client.solrj.response.QueryResponse query(boolean setDistribParams, Object[] q) throws Exception Returns the distributed QueryResponse- Throws:
Exception
-
query
protected org.apache.solr.client.solrj.response.QueryResponse query(boolean setDistribParams, org.apache.solr.common.params.SolrParams p) throws Exception Returns the distributed QueryResponse- Throws:
Exception
-
queryAndCompare
public 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.SolrServerExceptionIOException
-
queryAndCompare
public 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.SolrServerExceptionIOException
-
flags
-
compare
-
compare1
-
compare
-
compare
-
compare
-
compare
-
compare
-
compareSolrResponses
protected void compareSolrResponses(org.apache.solr.client.solrj.SolrResponse a, org.apache.solr.client.solrj.SolrResponse b) -
compareResponses
protected void compareResponses(org.apache.solr.client.solrj.response.QueryResponse a, org.apache.solr.client.solrj.response.QueryResponse b) -
getRandFields
public static Object[] getRandFields(String[] fields, BaseDistributedSearchTestCase.RandVal[] randVals) -
validateControlData
public void validateControlData(org.apache.solr.client.solrj.response.QueryResponse control) throws Exception Implementations 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
-
getSolrXml
-
seedSolrHome
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
-
setupJettySolrHome
- Throws:
IOException
-
createParams
-