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 |
---|---|
static BytesReference |
B_1 |
static BytesReference |
B_2 |
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 |
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,
long maxUnsafeAutoIdTimestamp,
ReferenceManager.RefreshListener refreshListener) |
EngineConfig |
copy(EngineConfig config,
EngineConfig.OpenMode openMode) |
EngineConfig |
copy(EngineConfig config,
EngineConfig.OpenMode openMode,
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(Store store,
java.nio.file.Path translogPath) |
static ParsedDocument |
createParsedDoc(java.lang.String id,
java.lang.String type,
java.lang.String routing) |
protected SnapshotDeletionPolicy |
createSnapshotDeletionPolicy() |
protected Store |
createStore() |
protected Store |
createStore(Directory directory) |
protected Translog |
createTranslog() |
protected Translog |
createTranslog(java.nio.file.Path translogPath) |
protected Engine.Index |
indexForDoc(ParsedDocument doc) |
protected Term |
newUid(ParsedDocument doc) |
protected Term |
newUid(java.lang.String id) |
protected Engine.Index |
replicaIndexForDoc(ParsedDocument doc,
long version,
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 type,
java.lang.String routing,
long timestamp,
long ttl,
ParseContext.Document document,
BytesReference source,
Mapping mappingUpdate) |
after, afterIfFailed, afterIfSuccessful, assertAllIndicesRemovedAndDeletionCompleted, assertArrayEquals, assertBusy, assertBusy, assertEquals, assertPathHasBeenCleared, assertSettingDeprecationsAndWarnings, assertWarnings, awaitBusy, awaitBusy, before, between, checkStaticState, copyWriteable, createParser, createParser, createParser, createParser, createParser, createTestAnalysis, createTestAnalysis, createTestAnalysis, enableWarningsCheck, ensureAllSearchContextsReleased, ensureCheckIndexPassed, frequently, generateRandomStringArray, generateRandomStringArray, getBwcIndicesPath, getDataPath, getSuiteFailureMarker, 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, restoreContentType, restoreFileSystem, scaledRandomIntBetween, setContentType, setFileSystem, settings, shuffleMap, shuffleXContent, shuffleXContent, spinForAtLeastNMilliseconds, spinForAtLeastOneMillisecond, terminate, terminate, tmpPaths, toShuffledXContent, 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 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
public static final BytesReference B_1
public static final BytesReference B_2
public static final BytesReference B_3
public 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, 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 type, java.lang.String routing)
protected static ParsedDocument testParsedDocument(java.lang.String id, java.lang.String type, java.lang.String routing, long timestamp, long ttl, ParseContext.Document document, BytesReference source, Mapping mappingUpdate)
protected Store createStore() throws java.io.IOException
java.io.IOException
protected Store createStore(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 SnapshotDeletionPolicy createSnapshotDeletionPolicy()
protected InternalEngine createEngine(Store store, java.nio.file.Path translogPath) 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
public EngineConfig config(IndexSettings indexSettings, Store store, java.nio.file.Path translogPath, MergePolicy mergePolicy, long maxUnsafeAutoIdTimestamp, ReferenceManager.RefreshListener refreshListener)
protected static BytesArray bytesArray(java.lang.String string)
protected Term newUid(java.lang.String id)
protected Term newUid(ParsedDocument doc)
protected Engine.Index indexForDoc(ParsedDocument doc)
protected Engine.Index replicaIndexForDoc(ParsedDocument doc, long version, boolean isRetry)