All Classes and Interfaces
Class
Description
AbstractAsyncBulkByScrollActionTestCase<Request extends org.elasticsearch.index.reindex.AbstractBulkByScrollRequest<Request>,Response extends org.elasticsearch.index.reindex.BulkByScrollResponse>
A resettable InputStream that only serves zeros.
AbstractBroadcastResponseTestCase<T extends org.elasticsearch.action.support.broadcast.BroadcastResponse>
Tests for
XContent filtering.Base class for test fixtures that requires a
HttpServer to work.Represents an HTTP Request.
Represents an HTTP Response.
AbstractNamedWriteableTestCase<T extends org.elasticsearch.common.io.stream.NamedWriteable>
Standard test case for testing the wire serialization of subclasses of NamedWriteable.
Abstract test case for testing NXY significant term heuristics
AbstractSerializingTestCase<T extends org.elasticsearch.xcontent.ToXContent & org.elasticsearch.common.io.stream.Writeable>
Abstract test case for testing significant term heuristics
AbstractWireSerializingTestCase<T extends org.elasticsearch.common.io.stream.Writeable>
Standard test case for testing the wire serialization of subclasses of Writeable.
Standard test case for testing wire serialization.
AbstractXContentTestCase<T extends org.elasticsearch.xcontent.ToXContent>
Tests converting to and from xcontent.
Test utilities for working with
ActionListeners.Base class for testing
Aggregator implementations.Alerts us if new analysis components are added to Lucene, so we don't miss them.
Marker class for components that have moved to the analysis-common modules.
Wraps a
RecoveryTarget to make all remote calls to be executed asynchronously using the provided executor.BaseAggregationTestCase<AB extends org.elasticsearch.search.aggregations.AbstractAggregationBuilder<AB>>
BasePipelineAggregationTestCase<AF extends org.elasticsearch.search.aggregations.pipeline.AbstractPipelineAggregationBuilder<AF>>
Initializes natives and installs test security manager
(init'd early by base classes to ensure it happens regardless of which
test case happens to be first, test ordering, etc).
A transport class that doesn't send anything but rather captures all requests for inspection from tests
Test utilities for working with
CheckedFunctions and CheckedSuppliers.Helper methods for generating cluster states
Utilities for running a
ClusterStateTaskExecutor in tests.Assertions for easier handling of our custom collections,
for example ImmutableOpenMap
Matchers for easier handling of our custom collections,
for example ImmutableOpenMap
A base test case for cli tools.
Permits the testing of async processes by interleaving all the tasks on a single thread in a pseudo-random (deterministic) fashion,
letting each task spawn future tasks, and simulating the passage of time.
Utilities that simplify testing of diffable classes
An integration test case that allows mocking the disk usage per node.
Response type from
DisruptableMockTransport.getConnectionStatus(DiscoveryNode) indicating whether, and how, messages should
be disrupted on this transport.When simulating sending requests to another node which might have rebooted, it's not realistic just to drop the action if the node
reboots; instead we need to simulate the error response that comes back.
A tuple of document id, sequence number, primary term, source and version of a document
A test class which contains a singleton instance of the
SystemIndices class that has been created with no
non-standard system indices defined except for those defined within the class itself.Utility class that encapsulates standard checks and assertions around testing the equals() and hashCode()
methods of objects that implement them.
A function that makes a copy of its input argument
A function that creates a copy of its input argument that is different from its
input in exactly one aspect (e.g.
Mocks behavior in ReplicaShardAllocator to remove delayed shards from list of unassigned shards so they don't get reassigned yet.
A lock
AllocationService allowing tests to override timeExtends Lucene's BaseDirectoryTestCase with ES test behavior.
Integration tests for
BlobStoreRepository implementations.Test harness for verifying
IndexInput implementations.ESIntegTestCase is an abstract base class to run integration
tests against a JVM private Elasticsearch Cluster.Defines a cluster scope for a
ESIntegTestCase subclass.The scope of a test cluster used together with
ESIntegTestCase.ClusterScope annotations on ESIntegTestCase subclasses.If a test is annotated with
ESIntegTestCase.SuiteScopeTestCase
the checks and modifications that are applied to the used test cluster are only done after all tests
of this class are executed.Annotation for third-party integration tests.
Integration tests for
BlobStoreRepository implementations rely on mock APIs that emulate cloud-based services.A
HttpHandler that allows to list stored blobsHTTP handler that injects random service errors
Note: it is not a good idea to allow this handler to simulate too many errors as it would
slow down the test suite.
HTTP handler that allows collect request stats per request type.
Superclass for tests that interact with an external test cluster using Elasticsearch's
RestClient.Helper class to check warnings in REST responses with sensitivity to versions
used in the target cluster.
A test that keep a singleton node started for all tests that can be used to get
references to Guice injectors in unit tests.
Base testcase for randomized unit testing with Elasticsearch
This cute helper class just holds all analysis building blocks that are used
to build IndexAnalyzers.
External cluster to run the tests against.
Query simulating serialization error on versions earlier than CURRENT
A transport that does nothing.
Base test case for subclasses of MappedFieldType
GeoGridAggregatorTestCase<T extends org.elasticsearch.search.aggregations.bucket.geogrid.InternalGeoGridBucket>
GeoGridTestCase<B extends org.elasticsearch.search.aggregations.bucket.geogrid.InternalGeoGridBucket,T extends org.elasticsearch.search.aggregations.bucket.geogrid.InternalGeoGrid<B>>
A base class for unit tests that need to create and shutdown
IndexShard instances easily,
containing utilities for shard creation and recoveries.Adds an ingest processor to be used in tests.
Simulates irregular long gc intervals.
InternalAggregationTestCase<T extends org.elasticsearch.search.aggregations.InternalAggregation>
Implementors of this test case should be aware that the aggregation under test needs to be registered
in the test's namedWriteableRegistry.
InternalMultiBucketAggregationTestCase<T extends org.elasticsearch.search.aggregations.InternalAggregation & org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation>
InternalSingleBucketAggregationTestCase<T extends org.elasticsearch.search.aggregations.bucket.InternalSingleBucketAggregation>
InternalTestCluster manages a set of JVM private nodes and allows convenient access to them.
An abstract class that is called during
InternalTestCluster.rollingRestart(InternalTestCluster.RestartCallback)
and / or InternalTestCluster.fullRestart(InternalTestCluster.RestartCallback) to execute actions at certain
stages of the restart.Represents a single log line in a json format.
Tests that extend this class verify that all json layout fields appear in the first few log lines after startup
Fields available upon process startup:
type, timestamp, level, component,
message, node.name, cluster.name.Returns a stream of json log lines.
Leak tracking mechanism that allows for ensuring that a resource has been properly released before a given object is garbage collected.
Basic implementation of the Wing and Gong Graph Search Algorithm, following the descriptions in
Gavin Lowe: Testing for linearizability
Concurrency and Computation: Practice and Experience 29, 4 (2017).
Sequence of invocations and responses, recording the run of a concurrent system.
Sequential specification of a datatype that allows for keyed access,
providing compositional checking (see
LinearizabilityChecker.SequentialSpec.partition(List)).Sequential specification of a datatype.
Matcher for
Lists that reports all errors at once.A
RunListener that allows changing the log level for a specific test method.Suspends all threads on the specified node in order to simulate a long gc.
Matcher for
Maps that reports all errors at once.Test case that lets you easilly build
MapperService based on some
mapping.Base class for testing
Mappers.Maintains the method of writing cluster states to disk for versions prior to
Version.V_7_6_0, preserved to test the classes that
read this state during an upgrade from these older versions.A mocked script used for testing purposes.
A plugin to use
MockEngineFactory.Support class to build MockEngines like
MockInternalEngine
since they need to subclass the actual engineGatewayMetaState constructor accepts a lot of arguments.A dummy http transport used by tests when not wanting to actually bind to a real address.
Marker plugin used by
MockNode to enable MockHttpTransport.This is a testing plugin that registers a generic
MockIndexEventListener.TestEventListener as a node level service
as well as a listener on every index.This is a marker plugin used to trigger MockNode to use this mock info service.
Some tests rely on the keyword tokenizer, but this tokenizer isn't part of lucene-core and therefor not available
in some modules.
Test appender that can be used to verify that certain events were logged correctly
A node for testing which allows:
Overriding Version.CURRENT
Adding test plugins that exist on the classpath
A mocked script engine that can be used for testing purpose.
A non-typed compiler for a single custom context
A script plugin that uses
MockScriptEngine as the script engine for tests.Marker plugin used by
MockNode to enable MockScriptService.Marker plugin used by
MockNode to enable MockSearchService.A mock implementation of secure settings for tests to use.
Mock single threaded
PrioritizedEsThreadPoolExecutor based on DeterministicTaskQueue,
simulating the behaviour of an executor returned by EsExecutors.newSinglePrioritizing(java.lang.String, java.util.concurrent.ThreadFactory, org.elasticsearch.common.util.concurrent.ThreadContext, java.util.concurrent.ScheduledExecutorService, org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor.StarvationWatcher).A mock task manager that allows adding listeners for events
Listener for task registration/unregistration
A terminal for tests which captures all output, and
can be plugged with fake input.
A basic transport implementation that allows to intercept requests that have been sent
A mock delegate service that allows to simulate different network topology failures.
Base testcase for testing
Module implementations.A formatter that allows named placeholders e.g.
Annotation used to set if internet network connectivity is required to run the test.
Network disruptions are modeled using two components:
1) the
NetworkDisruption.DisruptedLinks represents the links in the network that are to be disrupted
2) the NetworkDisruption.NetworkLinkDisruptionType represents the failure mode that is to be applied to the linksCreates two partitions with symmetric failures and a bridge node that can connect to both of the partitions
Represents a set of nodes with connections between nodes that are to be disrupted
Simulates slow or congested network.
Abstract class representing various types of network disruptions.
Creates two partitions with symmetric failures
Utility methods for creating
Settings instances defining a set of DiscoveryNodeRole.Client that always responds with
null to every request.Client that always response with
null to every request.Builds a message describing how two sets of values are unequal.
Holds an object and allows extraction of specific values from it, given their path
Exposes some package private stuff in PathUtils for framework purposes only!
Utility methods for testing plugins
Stores the posix attributes for a path and resets them on close.
A
Client that randomizes request parameters.Builds random search requests.
Helper test interface that provides basic socket connect functionality to
the readiness service for testing purposes
Marker plugin that will trigger
MockNode making RecoverySettingsChunkSizePlugin.CHUNK_SIZE_SETTING dynamic.Matcher that supports regular expression and allows to provide optional flags
A
RunListener that emits a command you can use to re-run a failing test with the failing random seed to
System.err.A common base class for Rest*ActionTests.
A mocked
NodeClient which can be easily reconfigured to verify arbitrary verification
functions, and can be reset to allow reconfiguration partway through a test without having to construct a new object.A test case with access to internals of a RestClient.
A dummy repository for testing which just needs restore overridden
A float encapsulation that dynamically accesses the score of a document.
A
MockMaker that works with SecurityManager.A wrapper around the default provider which itself just wraps
Instantiator instances to play nice with SecurityManager.A helper class that allows access to package private APIs for testing.
SimpleDiffableSerializationTestCase<T extends org.elasticsearch.cluster.Diffable<T> & org.elasticsearch.xcontent.ToXContent>
An abstract test case to ensure correct behavior of Diffable.
An abstract test case to ensure correct behavior of Diffable.
Allows to cache the last obtained test response and or part of it within variables
that can be used as input values in following requests and assertions.
StubbableTransport.RequestHandlingBehavior<Request extends org.elasticsearch.transport.TransportRequest>
Helper class to expose
CancellableTask.cancel(java.lang.String) for use in tests.Base test cluster that exposes the basis to run tests against any elasticsearch cluster, whose layout
(e.g.
Simplified version of
DocumentParserContext to be used in tests.Provides a convenience method for tests to construct an Environment when the config path does not matter.
A gateway allocator implementation that keeps an in memory list of started shard allocation
that are used as replies to the, normally async, fetch data requests.
Deprecated.
A utility class that simplifies the creation of
IndexNameExpressionResolver instances in tests to avoid repetition of
creating the constructor arguments for a default instance.Annotation used to set a custom log level when investigating test failures.
Annotation used to set a custom log level for controlling logging behavior in tests.
Processor used for testing, keeps track of how many times it is invoked and
accepts a
Consumer of IngestDocument to be called when executed.A helper that allows to create shard routing instances within tests, while not requiring to expose
different simplified constructors on the ShardRouting itself.
Converts
%test_thread_info in log4j patterns into information
based on the loggin thread's name.Assertions for exceptions and their messages
An FilterLeafReader that allows to throw exceptions if certain methods
are called on is.
Flags passed to
ThrowingLeafReaderWrapper.Thrower.maybeThrow(org.elasticsearch.test.engine.ThrowingLeafReaderWrapper.Flags)
when the corresponding method is called.A callback interface that allows to throw certain exceptions for
methods called on the IndexReader that is wrapped by
ThrowingLeafReaderWrapperWraps a Fields but with additional asserts
Wraps a Terms but with additional asserts
Helper methods for
TransportRecoveryAction.Utilities for selecting versions in tests