All Classes and Interfaces
Class
Description
AbstractAsyncBulkByScrollActionTestCase<Request extends AbstractBulkByScrollRequest<Request>,Response extends BulkByScrollResponse>
A resettable InputStream that only serves zeros.
Tests for
XContent
filtering.Base class for test fixtures that requires a
HttpServer
to work.Represents an HTTP Request.
Represents an HTTP Response.
Standard test case for testing the wire serialization of subclasses of NamedWriteable.
Abstract test case for testing NXY significant term heuristics
Tests a query vector builder
Abstract test case for testing significant term heuristics
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
ActionListener
s.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.
Test case ordering to be used in conjunction with
TestCaseOrdering
.Wraps a
RecoveryTarget
to make all remote calls to be executed asynchronously using the provided executor
.Collection of tests that can be applied to both geographic and cartesian coordinate data.
Collection of tests that can be applied to both geographic and cartesian coordinate data.
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
Integration Test for CartesianCentroid metric aggregator
Test utilities for working with
CheckedFunction
s and CheckedSupplier
s.An abstract test case to ensure correct behavior of Diffable.
Helper methods for generating cluster states
Utilities for running a
ClusterStateTaskExecutor
in tests.A base test case for cli tools.
CircuitBreakerService
that fails one twentieth of the time when you
add bytes.Some tests are specific to geographic test cases, notably those involving special behaviour
regarding the international data line.
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.
Marks a test suite or a test method that should run without security manager enabled.
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
The GraalVM spawns extra threads, which causes our thread leak
detection to fail.
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.
An in-memory java source code compiler.
Simulates irregular long gc intervals.
Implementors of this test case should be aware that the aggregation under test needs to be registered
in the test's namedWriteableRegistry.
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
Mapper
s.An example of a malformed value.
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
Swapping in various mock services
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.
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 small set of privileged operations that can be executed by unprivileged test code.
Random geo generation utilities for randomized
geo_point
type testing
does not depend on jts or spatial4j.A
Client
that randomizes request parameters.Builds random search requests.
Utility class for checking that objects become unreachable when expected.
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.
An abstract test case to ensure correct behavior of Diffable.
An abstract test case to ensure correct behavior of Diffable.
This interface allows tests to abstract away which exact QueryBuilder is used in the tests.
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.
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.Construct ingest documents for testing purposes
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.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
ThrowingLeafReaderWrapper
Wraps a Fields but with additional asserts
Wraps a Terms but with additional asserts
Helper methods for
TransportRecoveryAction
.Utilities for selecting versions in tests