test: do not use asn fields

Closes #28124
This commit is contained in:
Martijn van Groningen 2018-01-07 23:20:44 +01:00
parent 2e08916fa6
commit b46bb2efae
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
1 changed files with 6 additions and 2 deletions

View File

@ -209,11 +209,15 @@ public class GeoIpProcessorFactoryTests extends ESTestCase {
Set<GeoIpProcessor.Property> properties = EnumSet.noneOf(GeoIpProcessor.Property.class);
List<String> fieldNames = new ArrayList<>();
int counter = 0;
int numFields = scaledRandomIntBetween(1, GeoIpProcessor.Property.values().length);
for (int i = 0; i < numFields; i++) {
GeoIpProcessor.Property property = GeoIpProcessor.Property.values()[i];
for (GeoIpProcessor.Property property : GeoIpProcessor.Property.ALL_CITY_PROPERTIES) {
properties.add(property);
fieldNames.add(property.name().toLowerCase(Locale.ROOT));
if (++counter >= numFields) {
break;
}
}
Map<String, Object> config = new HashMap<>();
config.put("field", "_field");