Skip to content

Commit 9083055

Browse files
iverasecbuescher
authored andcommitted
Fix tests in LegacyGeoShapeWithDocValuesQueryTests (elastic#112467)
Similar to what we did in elastic#86118, it filters out points with longitude 180.
1 parent c81a13a commit 9083055

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,6 @@ tests:
170170
issue: https://github.com/elastic/elasticsearch/issues/112421
171171
- class: org.elasticsearch.indices.mapping.UpdateMappingIntegrationIT
172172
issue: https://github.com/elastic/elasticsearch/issues/112423
173-
- class: org.elasticsearch.xpack.spatial.index.query.LegacyGeoShapeWithDocValuesQueryTests
174-
method: testIndexPointsFromLine
175-
issue: https://github.com/elastic/elasticsearch/issues/112438
176173
- class: org.elasticsearch.xpack.esql.expression.function.aggregate.SpatialCentroidTests
177174
method: "testAggregateIntermediate {TestCase=<geo_point> #2}"
178175
issue: https://github.com/elastic/elasticsearch/issues/112461
@@ -188,9 +185,6 @@ tests:
188185
- class: org.elasticsearch.xpack.inference.external.http.RequestBasedTaskRunnerTests
189186
method: testLoopOneAtATime
190187
issue: https://github.com/elastic/elasticsearch/issues/112471
191-
- class: org.elasticsearch.xpack.spatial.index.query.LegacyGeoShapeWithDocValuesQueryTests
192-
method: testIndexPointsFromPolygon
193-
issue: https://github.com/elastic/elasticsearch/issues/112464
194188

195189
# Examples:
196190
#

x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/query/LegacyGeoShapeWithDocValuesQueryTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.elasticsearch.xpack.spatial.LocalStateSpatialPlugin;
2828

2929
import java.io.IOException;
30+
import java.util.Arrays;
3031
import java.util.Collection;
3132
import java.util.Collections;
3233

@@ -220,4 +221,8 @@ public void testFieldAlias() throws IOException {
220221

221222
assertHitCount(client().prepareSearch(defaultIndexName).setQuery(geoShapeQuery("alias", multiPoint)), 1L);
222223
}
224+
225+
protected boolean ignoreLons(double[] lons) {
226+
return Arrays.stream(lons).anyMatch(v -> v == 180);
227+
}
223228
}

0 commit comments

Comments
 (0)