Merge pull request #15379 from cbuescher/fix-geoDistanceQueryBuilderTest

Geo: Fix small error in distance normalization in test
This commit is contained in:
Christoph Büscher 2016-01-12 19:02:04 +01:00
commit b9af22ccdc
1 changed files with 1 additions and 0 deletions

View File

@ -204,6 +204,7 @@ public class GeoDistanceQueryBuilderTests extends AbstractQueryTestCase<GeoDista
double distance = queryBuilder.distance();
if (queryBuilder.geoDistance() != null) {
distance = queryBuilder.geoDistance().normalize(distance, DistanceUnit.DEFAULT);
distance = org.elasticsearch.common.geo.GeoUtils.maxRadialDistance(queryBuilder.point(), distance);
assertThat(geoQuery.getRadiusMeters(), closeTo(distance, GeoUtils.TOLERANCE));
}
}