AbstractNumericFieldMapperTestCasepublic abstract class ESSingleNodeTestCase extends ESTestCase
ESTestCase.GeohashGenerator, ESTestCase.TestAnalysisorg.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.WeeklycheckIndexFailed, deprecationLogger, failureAndSuccessEvents, loggerassertsAreEnabled, 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 | Description |
|---|---|
ESSingleNodeTestCase() |
| Modifier and Type | Method | Description |
|---|---|---|
Client |
client() |
Returns a client to the single-node cluster.
|
protected IndexService |
createIndex(java.lang.String index) |
Create a new index on the singleton node with empty index settings.
|
protected IndexService |
createIndex(java.lang.String index,
CreateIndexRequestBuilder createIndexRequestBuilder) |
|
protected IndexService |
createIndex(java.lang.String index,
Settings settings) |
Create a new index on the singleton node with the provided index settings.
|
protected IndexService |
createIndex(java.lang.String index,
Settings settings,
java.lang.String type,
java.lang.Object... mappings) |
Create a new index on the singleton node with the provided index settings.
|
protected IndexService |
createIndex(java.lang.String index,
Settings settings,
java.lang.String type,
XContentBuilder mappings) |
Create a new index on the singleton node with the provided index settings.
|
protected SearchContext |
createSearchContext(IndexService indexService) |
Create a new search context.
|
ClusterHealthStatus |
ensureGreen(java.lang.String... indices) |
Ensures the cluster has a green state via the cluster health API.
|
ClusterHealthStatus |
ensureGreen(TimeValue timeout,
java.lang.String... indices) |
Ensures the cluster has a green state via the cluster health API.
|
protected <T> T |
getInstanceFromNode(java.lang.Class<T> clazz) |
Get an instance for a particular class using the injector of the singleton node.
|
protected java.util.Collection<java.lang.Class<? extends Plugin>> |
getPlugins() |
The plugin classes that should be added to the node.
|
protected Node |
node() |
Return a reference to the singleton node.
|
protected Settings |
nodeSettings() |
Additional settings to add when creating the node.
|
protected java.util.Collection<java.lang.Class<? extends Plugin>> |
pluginList(java.lang.Class<? extends Plugin>... plugins) |
Helper method to create list of plugins without specifying generic types.
|
protected boolean |
resetNodeAfterTest() |
This method returns
true if the node that is used in the background should be reset
after each test. |
Index |
resolveIndex(java.lang.String index) |
|
void |
setUp() |
|
static void |
setUpClass() |
|
protected void |
startNode(long seed) |
|
void |
tearDown() |
|
static void |
tearDownClass() |
|
protected NamedXContentRegistry |
xContentRegistry() |
The
NamedXContentRegistry to use for this test. |
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, failafter, afterIfFailed, afterIfSuccessful, assertAllIndicesRemovedAndDeletionCompleted, assertArrayEquals, assertBusy, assertBusy, assertEquals, assertEqualsWithErrorMessageFromXContent, assertPathHasBeenCleared, assertSettingDeprecationsAndWarnings, assertSettingDeprecationsAndWarnings, assertWarnings, awaitBusy, awaitBusy, before, between, buildNewFakeTransportAddress, checkStaticState, copyStreamable, copyWriteable, 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, randomByteArrayOfLength, randomDateTimeZone, randomDouble, randomDoubleBetween, randomFloat, randomFrom, randomFrom, randomFrom, randomFrom, randomFrom, randomGeohash, randomInt, randomInt, randomIntBetween, randomLong, randomLongBetween, randomNonNegativeLong, randomPositiveTimeValue, randomRealisticUnicodeOfCodepointLength, randomRealisticUnicodeOfCodepointLengthBetween, randomRealisticUnicodeOfLength, randomRealisticUnicodeOfLengthBetween, randomShort, randomSubsetOf, randomSubsetOf, randomSubsetOf, randomTimeValue, randomTimeValue, randomTimeValue, randomTimeZone, 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, toShuffledXContent, writableRegistryaddVirusChecker, 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, wrapReaderprotected void startNode(long seed)
throws java.lang.Exception
java.lang.Exceptionpublic void setUp()
throws java.lang.Exception
setUp in class org.apache.lucene.util.LuceneTestCasejava.lang.Exceptionpublic void tearDown()
throws java.lang.Exception
tearDown in class org.apache.lucene.util.LuceneTestCasejava.lang.Exceptionpublic static void setUpClass()
throws java.lang.Exception
java.lang.Exceptionpublic static void tearDownClass()
throws java.io.IOException
java.io.IOExceptionprotected boolean resetNodeAfterTest()
true if the node that is used in the background should be reset
after each test. This is useful if the test changes the cluster state metadata etc. The default is
false.protected java.util.Collection<java.lang.Class<? extends Plugin>> getPlugins()
@SafeVarargs protected final java.util.Collection<java.lang.Class<? extends Plugin>> pluginList(java.lang.Class<? extends Plugin>... plugins)
protected Settings nodeSettings()
public Client client()
protected Node node()
protected <T> T getInstanceFromNode(java.lang.Class<T> clazz)
protected IndexService createIndex(java.lang.String index)
protected IndexService createIndex(java.lang.String index, Settings settings)
protected IndexService createIndex(java.lang.String index, Settings settings, java.lang.String type, XContentBuilder mappings)
protected IndexService createIndex(java.lang.String index, Settings settings, java.lang.String type, java.lang.Object... mappings)
protected IndexService createIndex(java.lang.String index, CreateIndexRequestBuilder createIndexRequestBuilder)
public Index resolveIndex(java.lang.String index)
protected SearchContext createSearchContext(IndexService indexService)
public ClusterHealthStatus ensureGreen(java.lang.String... indices)
public ClusterHealthStatus ensureGreen(TimeValue timeout, java.lang.String... indices)
timeout - time out value to set on ClusterHealthRequestprotected NamedXContentRegistry xContentRegistry()
ESTestCaseNamedXContentRegistry to use for this test. Subclasses should override and use liberally.xContentRegistry in class ESTestCase