use of org.opensearch.test.rest.OpenSearchRestTestCase.VersionSensitiveWarningsHandler in project OpenSearch by opensearch-project.
the class VersionSensitiveWarningsHandlerTests method expectVersionSpecificWarnings.
private static WarningsHandler expectVersionSpecificWarnings(Set<Version> nodeVersions, Consumer<VersionSensitiveWarningsHandler> expectationsSetter) {
// Based on EsRestTestCase.expectVersionSpecificWarnings helper method but without OpenSearchRestTestCase dependency
VersionSensitiveWarningsHandler warningsHandler = new VersionSensitiveWarningsHandler(nodeVersions);
expectationsSetter.accept(warningsHandler);
return warningsHandler;
}
Aggregations