Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ef7e859

Browse files
committedApr 10, 2024·
Fix the geo_point unit test
Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
1 parent df047ed commit ef7e859

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎server/src/test/java/org/opensearch/index/mapper/DerivedFieldTypeTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import org.apache.lucene.document.LatLonPoint;
1616
import org.apache.lucene.document.LongField;
1717
import org.apache.lucene.document.LongPoint;
18+
import org.opensearch.common.collect.Tuple;
1819
import org.opensearch.script.Script;
1920

2021
import java.util.List;
@@ -51,7 +52,7 @@ public void testDateType() {
5152
public void testGeoPointType() {
5253
DerivedFieldType dft = createDerivedFieldType("geo_point");
5354
assertTrue(dft.typeFieldMapper instanceof GeoPointFieldMapper);
54-
assertTrue(dft.indexableFieldGenerator.apply(List.of(10.0, 20.0)) instanceof LatLonPoint);
55+
assertTrue(dft.indexableFieldGenerator.apply(new Tuple<>(10.0, 20.0)) instanceof LatLonPoint);
5556
expectThrows(ClassCastException.class, () -> dft.indexableFieldGenerator.apply(List.of(10.0)));
5657
expectThrows(ClassCastException.class, () -> dft.indexableFieldGenerator.apply(List.of()));
5758
expectThrows(ClassCastException.class, () -> dft.indexableFieldGenerator.apply(List.of("10")));

0 commit comments

Comments
 (0)