public abstract class EngineTestCase extends ESTestCase
Modifier and Type | Class and Description |
---|---|
static interface |
EngineTestCase.IndexWriterFactory |
ESTestCase.GeohashGenerator, ESTestCase.TestAnalysis
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
Modifier and Type | Field and Description |
---|---|
protected AllocationId |
allocationId |
protected static BytesReference |
B_1 |
protected static BytesReference |
B_2 |
protected static BytesReference |
B_3 |
protected java.lang.String |
codecName |
protected IndexSettings |
defaultSettings |
protected InternalEngine |
engine |
protected static IndexSettings |
INDEX_SETTINGS |
protected java.nio.file.Path |
primaryTranslogDir |
protected InternalEngine |
replicaEngine |
protected java.nio.file.Path |
replicaTranslogDir |
protected ShardId |
shardId |
protected static BytesArray |
SOURCE |
protected Store |
store |
protected Store |
storeReplica |
protected ThreadPool |
threadPool |
checkIndexFailed, deprecationLogger, failureAndSuccessEvents, logger
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_CODEC, TEST_DIRECTORY, TEST_DOCVALUESFORMAT, TEST_LINE_DOCS_FILE, TEST_NIGHTLY, TEST_POSTINGSFORMAT, TEST_SLOW, TEST_THROTTLING, TEST_WEEKLY, VERBOSE
Constructor and Description |
---|
EngineTestCase() |
Modifier and Type | Method and Description |
---|---|
protected static BytesArray |
bytesArray(java.lang.String string) |
EngineConfig |
config(IndexSettings indexSettings,
Store store,
java.nio.file.Path translogPath,
MergePolicy mergePolicy,
ReferenceManager.RefreshListener refreshListener) |
EngineConfig |
config(IndexSettings indexSettings,
Store store,
java.nio.file.Path translogPath,
MergePolicy mergePolicy,
ReferenceManager.RefreshListener refreshListener,
Sort indexSort) |
EngineConfig |
copy(EngineConfig config,
EngineConfig.OpenMode openMode) |
EngineConfig |
copy(EngineConfig config,
EngineConfig.OpenMode openMode,
org.apache.lucene.analysis.Analyzer analyzer) |
protected InternalEngine |
createEngine(IndexSettings indexSettings,
Store store,
java.nio.file.Path translogPath,
MergePolicy mergePolicy) |
protected InternalEngine |
createEngine(IndexSettings indexSettings,
Store store,
java.nio.file.Path translogPath,
MergePolicy mergePolicy,
EngineTestCase.IndexWriterFactory indexWriterFactory) |
protected InternalEngine |
createEngine(IndexSettings indexSettings,
Store store,
java.nio.file.Path translogPath,
MergePolicy mergePolicy,
EngineTestCase.IndexWriterFactory indexWriterFactory,
java.util.function.BiFunction<EngineConfig,SeqNoStats,SequenceNumbersService> sequenceNumbersServiceSupplier) |
protected InternalEngine |
createEngine(IndexSettings indexSettings,
Store store,
java.nio.file.Path translogPath,
MergePolicy mergePolicy,
EngineTestCase.IndexWriterFactory indexWriterFactory,
java.util.function.BiFunction<EngineConfig,SeqNoStats,SequenceNumbersService> sequenceNumbersServiceSupplier,
java.util.function.ToLongBiFunction<Engine,Engine.Operation> seqNoForOperation) |
protected InternalEngine |
createEngine(IndexSettings indexSettings,
Store store,
java.nio.file.Path translogPath,
MergePolicy mergePolicy,
EngineTestCase.IndexWriterFactory indexWriterFactory,
java.util.function.BiFunction<EngineConfig,SeqNoStats,SequenceNumbersService> sequenceNumbersServiceSupplier,
java.util.function.ToLongBiFunction<Engine,Engine.Operation> seqNoForOperation,
Sort indexSort) |
protected InternalEngine |
createEngine(Store store,
java.nio.file.Path translogPath) |
protected InternalEngine |
createEngine(Store store,
java.nio.file.Path translogPath,
java.util.function.BiFunction<EngineConfig,SeqNoStats,SequenceNumbersService> sequenceNumbersServiceSupplier) |
protected InternalEngine |
createEngine(Store store,
java.nio.file.Path translogPath,
java.util.function.BiFunction<EngineConfig,SeqNoStats,SequenceNumbersService> sequenceNumbersServiceSupplier,
java.util.function.ToLongBiFunction<Engine,Engine.Operation> seqNoForOperation) |
static InternalEngine |
createInternalEngine(EngineTestCase.IndexWriterFactory indexWriterFactory,
java.util.function.BiFunction<EngineConfig,SeqNoStats,SequenceNumbersService> sequenceNumbersServiceSupplier,
java.util.function.ToLongBiFunction<Engine,Engine.Operation> seqNoForOperation,
EngineConfig config) |
static ParsedDocument |
createParsedDoc(java.lang.String id,
java.lang.String routing) |
protected Store |
createStore() |
protected Store |
createStore(org.apache.lucene.store.Directory directory) |
protected Store |
createStore(IndexSettings indexSettings,
org.apache.lucene.store.Directory directory) |
protected Translog |
createTranslog() |
protected Translog |
createTranslog(java.nio.file.Path translogPath) |
protected Engine.Index |
indexForDoc(ParsedDocument doc) |
protected Engine.Get |
newGet(boolean realtime,
ParsedDocument doc) |
protected Term |
newUid(ParsedDocument doc) |
protected Term |
newUid(java.lang.String id) |
protected Engine.Index |
replicaIndexForDoc(ParsedDocument doc,
long version,
long seqNo,
boolean isRetry) |
void |
setUp() |
void |
tearDown() |
protected static ParseContext.Document |
testDocument() |
protected static ParseContext.Document |
testDocumentWithTextField() |
protected static ParseContext.Document |
testDocumentWithTextField(java.lang.String value) |
protected static ParsedDocument |
testParsedDocument(java.lang.String id,
java.lang.String routing,
ParseContext.Document document,
BytesReference source,
Mapping mappingUpdate) |
after, afterIfFailed, afterIfSuccessful, assertAllIndicesRemovedAndDeletionCompleted, assertArrayEquals, assertBusy, assertBusy, assertEquals, assertEqualsWithErrorMessageFromXContent, assertPathHasBeenCleared, assertSettingDeprecationsAndWarnings, assertWarnings, awaitBusy, awaitBusy, before, between, buildNewFakeTransportAddress, checkStaticState, copyWriteable, createParser, createParser, createParser, createParser, createParser, createTestAnalysis, createTestAnalysis, createTestAnalysis, enableWarningsCheck, ensureAllSearchContextsReleased, ensureCheckIndexPassed, frequently, generateRandomStringArray, generateRandomStringArray, getBwcIndicesPath, getDataPath, getSuiteFailureMarker, getTestTransportPlugin, getTestTransportType, iterations, maybeSet, mockScript, newNodeEnvironment, newNodeEnvironment, newTestIndicesModule, newTestScriptModule, randomAlphaOfLength, randomAlphaOfLengthBetween, randomBoolean, randomByte, randomDateTimeZone, randomDouble, randomDoubleBetween, randomFloat, randomFrom, randomFrom, randomFrom, randomFrom, randomFrom, randomGeohash, randomInt, randomInt, randomIntBetween, randomLong, randomNonNegativeLong, randomPositiveTimeValue, randomRealisticUnicodeOfCodepointLength, randomRealisticUnicodeOfCodepointLengthBetween, randomRealisticUnicodeOfLength, randomRealisticUnicodeOfLengthBetween, randomShort, randomSubsetOf, randomSubsetOf, randomSubsetOf, randomTimeValue, randomTimeValue, randomTimeValue, randomUnicodeOfCodepointLength, randomUnicodeOfCodepointLengthBetween, randomUnicodeOfLength, randomUnicodeOfLengthBetween, randomUnique, randomValueOtherThan, randomValueOtherThanMany, resetCheckIndexStatus, resetPortCounter, restoreContentType, restoreFileSystem, scaledRandomIntBetween, setContentType, setFileSystem, settings, setUseNio, shuffleMap, shuffleXContent, shuffleXContent, spinForAtLeastNMilliseconds, spinForAtLeastOneMillisecond, terminate, terminate, tmpPaths, toShuffledXContent, writableRegistry, xContentRegistry
addVirusChecker, assertDeletedDocsEquals, assertDocsAndPositionsEnumEquals, assertDocsEnumEquals, assertDocsSkippingEquals, assertDocValuesEquals, assertDocValuesEquals, assertFieldInfosEquals, assertFieldsEquals, assertFieldStatisticsEquals, assertNormsEquals, assertPointsEquals, assertPositionsSkippingEquals, assertReaderEquals, assertReaderStatisticsEquals, assertStoredFieldEquals, assertStoredFieldsEquals, assertTermsEnumEquals, assertTermsEquals, assertTermsStatisticsEquals, assertTermStatsEquals, assertTermVectorsEquals, asSet, assumeFalse, assumeNoException, assumeTrue, assumeWorkingMMapOnWindows, atLeast, atLeast, closeAfterSuite, closeAfterTest, collate, createTempDir, createTempDir, createTempFile, createTempFile, dumpArray, dumpIterator, expectThrows, expectThrows, getBaseTempDirForTestClass, getDataInputStream, getOnlyLeafReader, getTestClass, getTestName, hasWorkingMMapOnWindows, isTestThread, localeForLanguageTag, maybeChangeLiveIndexWriterConfig, maybeWrapReader, newAlcoholicMergePolicy, newAlcoholicMergePolicy, newDirectory, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newIndexWriterConfig, newIOContext, newIOContext, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newMaybeVirusCheckingDirectory, newMaybeVirusCheckingFSDirectory, newMergePolicy, newMergePolicy, newMockDirectory, newMockDirectory, newMockDirectory, newMockFSDirectory, newMockFSDirectory, newSearcher, newSearcher, newSearcher, newStringField, newStringField, newStringField, newStringField, newTextField, newTextField, newTieredMergePolicy, newTieredMergePolicy, overrideDefaultQueryCache, overrideTestDefaultQueryCache, random, randomLocale, randomTimeZone, rarely, rarely, replaceMaxFailureRule, resetDefaultQueryCache, restoreCPUCoreCount, restoreIndexWriterMaxDocs, restoreSpins, runWithRestrictedPermissions, setIndexWriterMaxDocs, setupCPUCoreCount, setupSpins, slowFileExists, usually, usually, wrapReader
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, assertTrue, assertTrue, fail, fail
protected final ShardId shardId
protected final AllocationId allocationId
protected static final IndexSettings INDEX_SETTINGS
protected ThreadPool threadPool
protected Store store
protected Store storeReplica
protected InternalEngine engine
protected InternalEngine replicaEngine
protected IndexSettings defaultSettings
protected java.lang.String codecName
protected java.nio.file.Path primaryTranslogDir
protected java.nio.file.Path replicaTranslogDir
protected static final BytesReference B_1
protected static final BytesReference B_2
protected static final BytesReference B_3
protected static final BytesArray SOURCE
public void setUp() throws java.lang.Exception
setUp
in class org.apache.lucene.util.LuceneTestCase
java.lang.Exception
public EngineConfig copy(EngineConfig config, EngineConfig.OpenMode openMode)
public EngineConfig copy(EngineConfig config, EngineConfig.OpenMode openMode, org.apache.lucene.analysis.Analyzer analyzer)
public void tearDown() throws java.lang.Exception
tearDown
in class org.apache.lucene.util.LuceneTestCase
java.lang.Exception
protected static ParseContext.Document testDocumentWithTextField()
protected static ParseContext.Document testDocumentWithTextField(java.lang.String value)
protected static ParseContext.Document testDocument()
public static ParsedDocument createParsedDoc(java.lang.String id, java.lang.String routing)
protected static ParsedDocument testParsedDocument(java.lang.String id, java.lang.String routing, ParseContext.Document document, BytesReference source, Mapping mappingUpdate)
protected Store createStore() throws java.io.IOException
java.io.IOException
protected Store createStore(org.apache.lucene.store.Directory directory) throws java.io.IOException
java.io.IOException
protected Store createStore(IndexSettings indexSettings, org.apache.lucene.store.Directory directory) throws java.io.IOException
java.io.IOException
protected Translog createTranslog() throws java.io.IOException
java.io.IOException
protected Translog createTranslog(java.nio.file.Path translogPath) throws java.io.IOException
java.io.IOException
protected InternalEngine createEngine(Store store, java.nio.file.Path translogPath) throws java.io.IOException
java.io.IOException
protected InternalEngine createEngine(Store store, java.nio.file.Path translogPath, java.util.function.BiFunction<EngineConfig,SeqNoStats,SequenceNumbersService> sequenceNumbersServiceSupplier) throws java.io.IOException
java.io.IOException
protected InternalEngine createEngine(Store store, java.nio.file.Path translogPath, java.util.function.BiFunction<EngineConfig,SeqNoStats,SequenceNumbersService> sequenceNumbersServiceSupplier, java.util.function.ToLongBiFunction<Engine,Engine.Operation> seqNoForOperation) throws java.io.IOException
java.io.IOException
protected InternalEngine createEngine(IndexSettings indexSettings, Store store, java.nio.file.Path translogPath, MergePolicy mergePolicy) throws java.io.IOException
java.io.IOException
protected InternalEngine createEngine(IndexSettings indexSettings, Store store, java.nio.file.Path translogPath, MergePolicy mergePolicy, @Nullable EngineTestCase.IndexWriterFactory indexWriterFactory) throws java.io.IOException
java.io.IOException
protected InternalEngine createEngine(IndexSettings indexSettings, Store store, java.nio.file.Path translogPath, MergePolicy mergePolicy, @Nullable EngineTestCase.IndexWriterFactory indexWriterFactory, @Nullable java.util.function.BiFunction<EngineConfig,SeqNoStats,SequenceNumbersService> sequenceNumbersServiceSupplier) throws java.io.IOException
java.io.IOException
protected InternalEngine createEngine(IndexSettings indexSettings, Store store, java.nio.file.Path translogPath, MergePolicy mergePolicy, @Nullable EngineTestCase.IndexWriterFactory indexWriterFactory, @Nullable java.util.function.BiFunction<EngineConfig,SeqNoStats,SequenceNumbersService> sequenceNumbersServiceSupplier, @Nullable java.util.function.ToLongBiFunction<Engine,Engine.Operation> seqNoForOperation) throws java.io.IOException
java.io.IOException
protected InternalEngine createEngine(IndexSettings indexSettings, Store store, java.nio.file.Path translogPath, MergePolicy mergePolicy, @Nullable EngineTestCase.IndexWriterFactory indexWriterFactory, @Nullable java.util.function.BiFunction<EngineConfig,SeqNoStats,SequenceNumbersService> sequenceNumbersServiceSupplier, @Nullable java.util.function.ToLongBiFunction<Engine,Engine.Operation> seqNoForOperation, @Nullable Sort indexSort) throws java.io.IOException
java.io.IOException
public static InternalEngine createInternalEngine(@Nullable EngineTestCase.IndexWriterFactory indexWriterFactory, @Nullable java.util.function.BiFunction<EngineConfig,SeqNoStats,SequenceNumbersService> sequenceNumbersServiceSupplier, @Nullable java.util.function.ToLongBiFunction<Engine,Engine.Operation> seqNoForOperation, EngineConfig config)
public EngineConfig config(IndexSettings indexSettings, Store store, java.nio.file.Path translogPath, MergePolicy mergePolicy, ReferenceManager.RefreshListener refreshListener)
public EngineConfig config(IndexSettings indexSettings, Store store, java.nio.file.Path translogPath, MergePolicy mergePolicy, ReferenceManager.RefreshListener refreshListener, Sort indexSort)
protected static BytesArray bytesArray(java.lang.String string)
protected Term newUid(java.lang.String id)
protected Term newUid(ParsedDocument doc)
protected Engine.Get newGet(boolean realtime, ParsedDocument doc)
protected Engine.Index indexForDoc(ParsedDocument doc)
protected Engine.Index replicaIndexForDoc(ParsedDocument doc, long version, long seqNo, boolean isRetry)