[TEST] Fix unit test failure in RestHighLevelClientTests (#36)

* fix testProvidedNamedXContents by modifying the assertion

Signed-off-by: Peter Nied <petern@amazon.com>
This commit is contained in:
Tianli Feng 2021-02-03 19:25:04 -08:00 committed by Peter Nied
parent 3da88c2f6c
commit ae0dc2ff5b
1 changed files with 2 additions and 2 deletions

View File

@ -660,7 +660,7 @@ public class RestHighLevelClientTests extends ESTestCase {
public void testProvidedNamedXContents() {
List<NamedXContentRegistry.Entry> namedXContents = RestHighLevelClient.getProvidedNamedXContents();
assertEquals(75, namedXContents.size());
assertEquals(13, namedXContents.size());
Map<Class<?>, Integer> categories = new HashMap<>();
List<String> names = new ArrayList<>();
for (NamedXContentRegistry.Entry namedXContent : namedXContents) {
@ -670,7 +670,7 @@ public class RestHighLevelClientTests extends ESTestCase {
categories.put(namedXContent.categoryClass, counter + 1);
}
}
assertEquals("Had: " + categories, 14, categories.size());
assertEquals("Had: " + categories, 3, categories.size());
assertEquals(Integer.valueOf(3), categories.get(Aggregation.class));
assertTrue(names.contains(ChildrenAggregationBuilder.NAME));
assertTrue(names.contains(MatrixStatsAggregationBuilder.NAME));