From 033bfca0502e1df0e021b206984e802042e13bc7 Mon Sep 17 00:00:00 2001 From: markharwood Date: Tue, 11 Dec 2018 14:38:33 +0000 Subject: [PATCH] Added javadoc, removed duplicate check from test --- .../java/org/elasticsearch/test/rest/ESRestTestCase.java | 6 ++++-- .../test/rest/VersionSensitiveWarningsHandlerTests.java | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java index 3a475b6ed2360..4115543a56e61 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java @@ -182,8 +182,10 @@ public void initClient() throws IOException { assert nodeVersions != null; } - // Helper class to check warnings in REST responses with sensitivity to versions - // used in the target cluster. + /** + * Helper class to check warnings in REST responses with sensitivity to versions + * used in the target cluster. + */ public static class VersionSensitiveWarningsHandler implements WarningsHandler { Set requiredSameVersionClusterWarnings = new HashSet<>(); Set allowedWarnings = new HashSet<>(); diff --git a/test/framework/src/test/java/org/elasticsearch/test/rest/VersionSensitiveWarningsHandlerTests.java b/test/framework/src/test/java/org/elasticsearch/test/rest/VersionSensitiveWarningsHandlerTests.java index e8dc8bd84608e..38fb9ece1133c 100644 --- a/test/framework/src/test/java/org/elasticsearch/test/rest/VersionSensitiveWarningsHandlerTests.java +++ b/test/framework/src/test/java/org/elasticsearch/test/rest/VersionSensitiveWarningsHandlerTests.java @@ -55,7 +55,6 @@ public void testMixedVersionCluster() throws IOException { assertFalse(handler.warningsShouldFailRequest(Arrays.asList("expectedCurrent1"))); assertFalse(handler.warningsShouldFailRequest(Arrays.asList("Expected legacy warning"))); assertFalse(handler.warningsShouldFailRequest(Arrays.asList("expectedCurrent1", "Expected legacy warning"))); - assertFalse(handler.warningsShouldFailRequest(Arrays.asList("Expected legacy warning"))); assertTrue(handler.warningsShouldFailRequest(Arrays.asList("expectedCurrent1", "Unexpected legacy warning"))); assertTrue(handler.warningsShouldFailRequest(Arrays.asList("Unexpected legacy warning"))); assertFalse(handler.warningsShouldFailRequest(Collections.emptyList()));