[TEST] Ensure reflectively created Lists always have at least one element

Fixes an issue in the test where the class can be constructed but fails to
replace its children due to validation of the number of elements in the list.

Original commit: elastic/x-pack-elasticsearch@3199318d9c
This commit is contained in:
Lee Hinman 2018-01-23 15:22:14 -07:00
parent de15f7123b
commit 0256f736e1
1 changed files with 1 additions and 1 deletions

View File

@ -346,7 +346,7 @@ public class NodeSubclassTests<T extends B, B extends Node<B>> extends ESTestCas
return map;
}
if (pt.getRawType() == List.class) {
return makeList(toBuildClass, pt, between(0, 10));
return makeList(toBuildClass, pt, between(1, 10));
}
if (pt.getRawType() == Supplier.class) {
if (toBuildClass == AggValueInput.class) {