[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:
parent
3da88c2f6c
commit
ae0dc2ff5b
|
@ -660,7 +660,7 @@ public class RestHighLevelClientTests extends ESTestCase {
|
||||||
|
|
||||||
public void testProvidedNamedXContents() {
|
public void testProvidedNamedXContents() {
|
||||||
List<NamedXContentRegistry.Entry> namedXContents = RestHighLevelClient.getProvidedNamedXContents();
|
List<NamedXContentRegistry.Entry> namedXContents = RestHighLevelClient.getProvidedNamedXContents();
|
||||||
assertEquals(75, namedXContents.size());
|
assertEquals(13, namedXContents.size());
|
||||||
Map<Class<?>, Integer> categories = new HashMap<>();
|
Map<Class<?>, Integer> categories = new HashMap<>();
|
||||||
List<String> names = new ArrayList<>();
|
List<String> names = new ArrayList<>();
|
||||||
for (NamedXContentRegistry.Entry namedXContent : namedXContents) {
|
for (NamedXContentRegistry.Entry namedXContent : namedXContents) {
|
||||||
|
@ -670,7 +670,7 @@ public class RestHighLevelClientTests extends ESTestCase {
|
||||||
categories.put(namedXContent.categoryClass, counter + 1);
|
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));
|
assertEquals(Integer.valueOf(3), categories.get(Aggregation.class));
|
||||||
assertTrue(names.contains(ChildrenAggregationBuilder.NAME));
|
assertTrue(names.contains(ChildrenAggregationBuilder.NAME));
|
||||||
assertTrue(names.contains(MatrixStatsAggregationBuilder.NAME));
|
assertTrue(names.contains(MatrixStatsAggregationBuilder.NAME));
|
||||||
|
|
Loading…
Reference in New Issue