Package org.elasticsearch.test.rest
Class ESRestTestCase.VersionSensitiveWarningsHandler
java.lang.Object
org.elasticsearch.test.rest.ESRestTestCase.VersionSensitiveWarningsHandler
- All Implemented Interfaces:
WarningsHandler
- Enclosing class:
- ESRestTestCase
public static class ESRestTestCase.VersionSensitiveWarningsHandler
extends Object
implements WarningsHandler
Helper class to check warnings in REST responses with sensitivity to versions
used in the target cluster.
-
Field Summary
Fields inherited from interface org.elasticsearch.client.WarningsHandler
PERMISSIVE, STRICT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
compatible
(String... allowedWarningsToAdd) Adds to the set of warnings that are permissible (but not required) when running in mixed-version clusters or those that differ in version from the test client.void
Adds to the set of warnings that are all required in responses if the cluster is formed from nodes all running the exact same version as the client.boolean
warningsShouldFailRequest
(List<String> warnings)
-
Constructor Details
-
VersionSensitiveWarningsHandler
-
-
Method Details
-
current
Adds to the set of warnings that are all required in responses if the cluster is formed from nodes all running the exact same version as the client.- Parameters:
requiredWarnings
- a set of required warnings
-
compatible
Adds to the set of warnings that are permissible (but not required) when running in mixed-version clusters or those that differ in version from the test client.- Parameters:
allowedWarningsToAdd
- optional warnings that will be ignored if received
-
warningsShouldFailRequest
- Specified by:
warningsShouldFailRequest
in interfaceWarningsHandler
-