All Classes and Interfaces
Class
Description
An abstract test case to ensure correct behavior of Diffable.
An abstract test case to ensure correct behavior of Diffable.
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.
Standard test case for testing the wire serialization of subclasses of Writeable.
Standard test case for testing wire serialization.
Tests converting to and from xcontent.
Base class for testing
Aggregator implementations.Wrapper around Aggregator class
Maintains a count for times collect() is invoked - number of documents visited
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.
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.Represents the avalanche statistics of a hash function.
Base class for the Aggregator Tests which are registered under Composite Aggregation.
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).
ThreadFilter to exclude ThreadLeak checks for BC’s global background threads
A transport class that doesn't send anything but rather captures all requests for inspection from tests
Used to execute REST requests according to the docs snippets that need to be tests.
Specification of an OpenSearch 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
ClientYamlTestSections ready to be run.Used by
OpenSearchClientYamlSuiteTestCase 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.
Helper methods for generating cluster states
A base test case for cli tools.
Utility to provide a
RecoverySettings instance containing all defaultsUtilities that simplify testing of diffable classes
Response type from
DisruptableMockTransport.getConnectionStatus(DiscoveryNode) indicating whether, and how, messages should
be disrupted on this transport.A tuple of document id, sequence number, primary term, source and version of a document
Represents a do section:
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.
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.
Deprecated.
Base class for testing
FieldMappers.Base test case for subclasses of MappedFieldType
Represents a gt assert section:
Represents a gte assert section:
Base class for testing the quality of hash functions.
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:
Represents an is_true assert section:
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.
Represents a length assert section:
Represents a lt assert section:
Represents a lte assert section:
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.
Base class for testing
Mappers.Represents a match assert section:
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
Used for cases when the logger is dynamically named such as to include an index name or shard id
Best used in conjunction with the root logger:
@TestLogging(value = "_root:debug", reason = "Validate logging output");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
PrioritizedOpenSearchThreadPoolExecutor based on DeterministicTaskQueue,
simulating the behaviour of an executor returned by OpenSearchExecutors.newSinglePrioritizing(java.lang.String, java.util.concurrent.ThreadFactory, org.opensearch.common.util.concurrent.ThreadContext, java.util.concurrent.ScheduledExecutorService).A specialized MockNioTransport that supports streaming transport channels for testing streaming search.
A mock task manager that allows adding listeners for events
Listener for task registration/unregistration
Mock
Telemetry implementation for testing.Mock
TelemetryPlugin implementation for testing.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 to extract specific values from it given their path
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 timeUtility class to show shards distribution across nodes.
Extends Lucene's BaseDirectoryTestCase with OpenSearch test behavior.
Integration tests for
BlobStoreRepository implementations.Runs a suite of yaml tests shared with all the official OpenSearch
clients against an opensearch cluster.
Test harness for verifying
IndexInput implementations.OpenSearchIntegTestCase is an abstract base class to run integration
tests against a JVM private OpenSearch Cluster.Defines a cluster scope for a
OpenSearchIntegTestCase subclass.The scope of a test cluster used together with
OpenSearchIntegTestCase.ClusterScope annotations on OpenSearchIntegTestCase subclasses.If a test is annotated with
OpenSearchIntegTestCase.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
HTTP handler that allows collect request stats per request type.
Superclass for tests that interact with an external test cluster using OpenSearch'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 OpenSearch
Define LockFeatureFlag annotation for unit tests.
This cute helper class just holds all analysis building blocks that are used
to build IndexAnalyzers.
Base class for running the tests with parameterization using dynamic settings: the cluster will be created once before the test suite and the
settings will be applied dynamically, please notice that not all settings could be changed dynamically (consider using
ParameterizedStaticSettingsOpenSearchIntegTestCase
instead).Base class for running the tests with parameterization with static settings: the cluster will be pre-created with the settings at startup, the method
ParameterizedStaticSettingsOpenSearchIntegTestCase.hasSameParametersAs(ParameterizedOpenSearchIntegTestCase) is being used by the test scaffolding to detect when the test suite is instantiated with
the new parameters and the test cluster has to be recreated.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.
Matcher that supports regular expression and allows to provide optional flags
Utilities for remote store related operations used across one or more tests.
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.
Represents a set section:
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 opensearch version the tests are running against
- a specific test feature required that might not be implemented yet by the runner
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.
A simple implementation of
ActionListener that captures the response and failures used for testing purposes.Base test cluster that exposes the basis to run tests against any opensearch cluster, whose layout
(e.g.
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.
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.
Test logs appender that provides functionality to extract specific logs/exception messages and wait for it to show up
Processor used for testing, keeps track of how many times it is invoked and
accepts a
Consumer of IngestDocument to be called when executed.This class is used by unit tests implementing SegmentReplicationSource
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(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
Represents a transform_and_set section:
Utilities for selecting versions in tests
A resettable InputStream that only serves zeros.
FieldMapperTestCase2