Package org.apache.solr.cloud
Class AbstractBasicDistributedZkTestBase
- java.lang.Object
-
- org.junit.Assert
-
- org.apache.lucene.util.LuceneTestCase
-
- org.apache.solr.SolrTestCase
-
- org.apache.solr.SolrTestCaseJ4
-
- org.apache.solr.BaseDistributedSearchTestCase
-
- org.apache.solr.cloud.AbstractDistribZkTestBase
-
- org.apache.solr.cloud.AbstractFullDistribZkTestBase
-
- org.apache.solr.cloud.AbstractBasicDistributedZkTestBase
-
- Direct Known Subclasses:
AbstractUnloadDistributedZkTestBase
public abstract class AbstractBasicDistributedZkTestBase extends AbstractFullDistribZkTestBase
This test simply does a bunch of basic things in solrcloud mode and asserts things work as expected.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.cloud.AbstractFullDistribZkTestBase
AbstractFullDistribZkTestBase.CloudJettyRunner, AbstractFullDistribZkTestBase.CloudSolrServerClient
-
Nested classes/interfaces inherited from class org.apache.solr.BaseDistributedSearchTestCase
BaseDistributedSearchTestCase.RandDate, BaseDistributedSearchTestCase.RandVal, BaseDistributedSearchTestCase.ShardsFixed, BaseDistributedSearchTestCase.ShardsRepeat, BaseDistributedSearchTestCase.ShardsRepeatRule
-
Nested classes/interfaces inherited from class org.apache.solr.SolrTestCaseJ4
SolrTestCaseJ4.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.util.LuceneTestCase
org.apache.lucene.util.LuceneTestCase.AwaitsFix, org.apache.lucene.util.LuceneTestCase.BadApple, org.apache.lucene.util.LuceneTestCase.Monster, org.apache.lucene.util.LuceneTestCase.Nightly, org.apache.lucene.util.LuceneTestCase.Slow, org.apache.lucene.util.LuceneTestCase.SuppressCodecs, org.apache.lucene.util.LuceneTestCase.SuppressFileSystems, org.apache.lucene.util.LuceneTestCase.SuppressFsync, org.apache.lucene.util.LuceneTestCase.SuppressReproduceLine, org.apache.lucene.util.LuceneTestCase.SuppressSysoutChecks, org.apache.lucene.util.LuceneTestCase.SuppressTempFileChecks, org.apache.lucene.util.LuceneTestCase.ThrowingRunnable, org.apache.lucene.util.LuceneTestCase.Weekly
-
-
Field Summary
-
Fields inherited from class org.apache.solr.cloud.AbstractFullDistribZkTestBase
chaosMonkey, cloudClient, cloudJettys, controlClientCloud, coreClients, printLayoutOnTearDown, SHARD1, SHARD2, shardToJetty, shardToLeaderJetty, sliceCount, useJettyDataDir
-
Fields inherited from class org.apache.solr.cloud.AbstractDistribZkTestBase
zkServer
-
Fields inherited from class org.apache.solr.BaseDistributedSearchTestCase
clients, context, controlClient, controlJetty, deadServers, executor, fieldNames, flags, FUZZY, handle, id, jettys, nThreads, ORDERED, r, randVals, rdate, rdouble, repeatRule, rfloat, rint, rlong, shards, shardsArr, SKIP, SKIPVAL, stress, testDir, UNORDERED, useExplicitNodeNames, verifyStress
-
Fields 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, 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.SolrTestCase
solrClassRules
-
Fields inherited from class org.apache.lucene.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_BADAPPLES, SYSPROP_FAILFAST, SYSPROP_MAXFAILURES, SYSPROP_MONSTER, SYSPROP_NIGHTLY, SYSPROP_SLOW, 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_SLOW, TEST_THROTTLING, TEST_WEEKLY, VERBOSE
-
-
Constructor Summary
Constructors Constructor Description AbstractBasicDistributedZkTestBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
beforeBDZKTClass()
protected org.apache.solr.client.solrj.response.CollectionAdminResponse
createCollection(Map<String,List<Integer>> collectionInfos, String collectionName, String configSetName, int numShards, int numReplicas, org.apache.solr.client.solrj.SolrClient client, String createNodeSetStr)
protected void
createCollectionInOneInstance(org.apache.solr.client.solrj.SolrClient client, String nodeName, ThreadPoolExecutor executor, String collection, int numShards, int numReplicas)
Create a collection in single nodeprotected org.apache.solr.client.solrj.SolrClient
createNewSolrClient(String collection, String baseUrl)
protected org.apache.solr.client.solrj.SolrClient
createNewSolrClient(String collection, String baseUrl, int connectionTimeoutMillis, int socketTimeoutMillis)
void
distribTearDown()
protected String
getBaseUrl(org.apache.solr.client.solrj.SolrClient client)
protected org.apache.solr.common.cloud.ZkCoreNodeProps
getLeaderUrlFromZk(String collection, String slice)
protected void
indexDoc(String collection, org.apache.solr.common.SolrInputDocument doc)
protected org.apache.solr.client.solrj.response.QueryResponse
queryServer(org.apache.solr.common.params.ModifiableSolrParams params)
protected void
setDistributedParams(org.apache.solr.common.params.ModifiableSolrParams params)
protected void
test()
protected boolean
useTlogReplicas()
-
Methods inherited from class org.apache.solr.cloud.AbstractFullDistribZkTestBase
afterClass, assertDocCounts, attemptCollectionDelete, beforeClass, beforeFullSolrCloudTest, beforeTest, checkForCollection, checkQueries, checkShardConsistency, checkShardConsistency, checkShardConsistency, checkShardConsistency, checkShardConsistency, clearErrorHook, closeRestTestHarnesses, commit, createCloudClient, createCollection, createCollection, createCollection, createCollection, createCollection, createCollectionRetry, createJetty, createJetty, createJetty, createJettys, createNewSolrClient, createNewSolrClient, createNewSolrClient, createNewSolrClient, createProxiedJetty, createServers, del, destroyServers, distribSetUp, enableAutoSoftCommit, ensureAllReplicasAreActive, forAllRestTestHarnesses, getBaseUrl, getClient, getCommonCloudSolrClient, getDataDir, getDoc, getIndexVersion, getJettyOnPort, getProxyForReplica, getPullReplicaCount, getReplicaPort, getRequestStateAfterCompletion, getShardLeader, getTotalReplicas, getUrlFromZk, index_specific, index_specific, indexAbunchOfDocs, indexDoc, initCloud, logReplicationDetails, logReplicaTypesReplicationInfo, printClusterStateInfo, printClusterStateInfo, queryAndCompareReplicas, queryAndCompareShards, randomlyEnableAutoSoftCommit, randomRestTestHarness, randomRestTestHarness, reloadCollection, sendDocsWithRetry, sendDocsWithRetry, setErrorHook, setupRestTestHarnesses, showCounts, updateMappingsFromZk, updateMappingsFromZk, waitForActiveReplicaCount, waitForAllWarmingSearchers, waitForCollection, waitForLiveNode, waitForNon403or404or503, waitForNoShardInconsistency, waitForRecoveriesToFinish, waitForRecoveriesToFinish, waitForRecoveriesToFinish, waitForReplicationFromReplicas, waitForThingsToLevelOut, waitForThingsToLevelOut
-
Methods inherited from class org.apache.solr.cloud.AbstractDistribZkTestBase
assertAllActive, beforeThisClass, copyConfigUp, getCloudSchemaFile, getCloudSolrConfig, printLayout, restartZk, verifyReplicaStatus, waitForCollectionToDisappear, waitForRecoveriesToFinish, waitForRecoveriesToFinish, waitForRecoveriesToFinish, waitForRecoveriesToFinish
-
Methods inherited from class org.apache.solr.BaseDistributedSearchTestCase
add, addFields, addRandFields, buildUrl, clearHostContext, clearSolrDisableShardsWhitelist, compare, compare, compare, compare, compare, compare, compare1, compareResponses, compareSolrResponses, createControlJetty, createJetty, createJetty, createJetty, createParams, del, delQ, eq, fixShardCount, flags, getExtraRequestFilters, getExtraServlets, getFieldNames, getRandFields, getRandValues, getShardCount, getShardsString, getSolrHome, getSolrXml, index, indexDoc, indexr, initHostContext, initialize, query, query, query, query, queryAndCompare, queryAndCompare, seedSolrHome, setSolrDisableShardsWhitelist, setupJettySolrHome, validateControlData
-
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, 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.SolrTestCase
afterSolrTestCase, beforeSolrTestCase, checkSyspropForceBeforeAssumptionFailure, checkSyspropForceBeforeClassAssumptionFailure
-
Methods inherited from class org.apache.lucene.util.LuceneTestCase
addVirusChecker, 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, 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.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, assertThat, assertThat, assertThrows, assertThrows, assertTrue, assertTrue, fail, fail
-
-
-
-
Method Detail
-
beforeBDZKTClass
public static void beforeBDZKTClass()
-
useTlogReplicas
protected boolean useTlogReplicas()
- Overrides:
useTlogReplicas
in classAbstractFullDistribZkTestBase
-
setDistributedParams
protected void setDistributedParams(org.apache.solr.common.params.ModifiableSolrParams params)
- Overrides:
setDistributedParams
in classAbstractFullDistribZkTestBase
-
createCollectionInOneInstance
protected 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)
-
createCollection
protected org.apache.solr.client.solrj.response.CollectionAdminResponse createCollection(Map<String,List<Integer>> collectionInfos, String collectionName, String configSetName, int numShards, int numReplicas, org.apache.solr.client.solrj.SolrClient client, String createNodeSetStr) throws org.apache.solr.client.solrj.SolrServerException, IOException
- Overrides:
createCollection
in classAbstractFullDistribZkTestBase
- Throws:
org.apache.solr.client.solrj.SolrServerException
IOException
-
getLeaderUrlFromZk
protected org.apache.solr.common.cloud.ZkCoreNodeProps getLeaderUrlFromZk(String collection, String slice)
- Overrides:
getLeaderUrlFromZk
in classAbstractFullDistribZkTestBase
-
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)
- Overrides:
createNewSolrClient
in classAbstractFullDistribZkTestBase
-
createNewSolrClient
protected org.apache.solr.client.solrj.SolrClient createNewSolrClient(String collection, String baseUrl, int connectionTimeoutMillis, int socketTimeoutMillis)
-
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 classAbstractFullDistribZkTestBase
- Throws:
org.apache.solr.client.solrj.SolrServerException
IOException
-
distribTearDown
public void distribTearDown() throws Exception
- Overrides:
distribTearDown
in classAbstractFullDistribZkTestBase
- Throws:
Exception
-
-