All Classes and Interfaces
Class
Description
AbstractAsyncBulkByScrollActionTestCase<Request extends AbstractBulkByScrollRequest<Request>,Response extends BulkByScrollResponse>
A resettable InputStream that only serves zeros.
AbstractDiffableSerializationTestCase<T extends 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.
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
AbstractSchemaValidationTestCase<T extends org.elasticsearch.xcontent.ToXContent>
Test case for validating
ToXContent
objects against a json schema.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
.Represents a test fragment that contains the information needed to call an api
Base class for executable sections that hold assertions
Wraps a
RecoveryTarget
to make all remote calls to be executed asynchronously using the provided executor
.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
CheckedFunction
s and CheckedSupplier
s.Used to execute REST requests according to the docs snippets that need to be tests.
Specification of an Elasticsearch endpoint used by the YAML specs to generate REST requests.
Parser for a
ClientYamlSuiteRestApi
.Holds the specification used to turn
do
actions in the YAML suite into REST api calls.Wraps
ClientYamlTestSection
s ready to be run.Used by
ESClientYamlSuiteTestCase
to execute REST requests according to the tests written in yaml suite files.Execution context passed across the REST tests.
Response obtained from a REST call, eagerly reads the response body into a string for later optional parsing.
Exception obtained from a REST call in case the response code indicated an error.
Represents a test section, which is composed of a skip section and multiple executable sections.
Holds a REST test suite loaded from a specific yaml file.
Represents a close_to assert section:
- close_to: { get.fields._routing: { value: 5.1, error: 0.00001 } }
Helper methods for generating cluster states
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
Represents a do section:
- do:
catch: missing
headers:
Authorization: Basic user:pass
Content-Type: application/json
warnings|warnings_regex:
- Stuff is deprecated, yo
- Don't use deprecated stuff
- Please, stop.
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.Runs a suite of yaml tests shared with all the official Elasticsearch
clients against against an elasticsearch cluster.
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.
Represents a test fragment that can be executed (e.g.
External cluster to run the tests against.
A transport that does nothing.
Allows to register additional features supported by the tests runner.
Base test case for subclasses of MappedFieldType
Represents a gt assert section:
Represents a gte assert section:
- gte: { fields._ttl: 0 }
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.
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 an is_false assert section:
- is_false: get.fields.bar
Represents an is_true assert section:
- is_true: get.fields.bar
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.
Represents a length assert section:
Represents a lt assert section:
- lt: { fields._ttl: 20000}
Represents a lte assert section:
- lte: { fields._ttl: 0 }
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.
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.
Test case that lets you easilly build
MapperService
based on some
mapping.Base class for testing
Mapper
s.Represents a match assert section:
- match: { get.fields._routing: "5" }
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.
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
Deprecated.
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.
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
.Represents a set section:
- set: {_scroll_id: scroll_id}
Represents a setup section.
A helper class that allows access to package private APIs for testing.
Represents a skip section that tells whether a specific test section or suite needs to be skipped
based on:
- the elasticsearch version the tests are running against
- a specific test feature required that might not be implemented yet by the runner
- an operating system (full name, including specific Linux distributions) that might show a certain behavior
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.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
Represents a transform_and_set section:
Helper methods for
TransportRecoveryAction
.Utilities for selecting versions in tests