Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Maurya <[email protected]>
  • Loading branch information
rishabhmaurya committed Apr 5, 2024
1 parent 5a2b957 commit 3887cb2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import org.opensearch.index.fielddata.ScriptDocValues;
import org.opensearch.index.fielddata.plain.AbstractLeafOrdinalsFieldData;
import org.opensearch.index.mapper.ContentPath;
import org.opensearch.index.mapper.DerivedField;
import org.opensearch.index.mapper.DerivedFieldMapper;
import org.opensearch.index.mapper.DocumentMapper;
import org.opensearch.index.mapper.IndexFieldMapper;
Expand All @@ -73,6 +74,7 @@
import org.opensearch.index.mapper.MapperService;
import org.opensearch.index.mapper.MappingLookup;
import org.opensearch.index.mapper.TextFieldMapper;
import org.opensearch.script.Script;
import org.opensearch.search.lookup.LeafDocLookup;
import org.opensearch.search.lookup.LeafSearchLookup;
import org.opensearch.search.lookup.SearchLookup;
Expand Down Expand Up @@ -132,7 +134,8 @@ public void testDerivedFieldMapping() {
assertNull(context.failIfFieldMappingNotFound("test_derived", null));
DocumentMapper documentMapper = mock(DocumentMapper.class);
Mapper.BuilderContext builderContext = new Mapper.BuilderContext(Settings.EMPTY, new ContentPath(0));
DerivedFieldMapper derivedFieldMapper = new DerivedFieldMapper.Builder("test_derived").build(builderContext);
DerivedFieldMapper derivedFieldMapper = new DerivedFieldMapper.Builder(new DerivedField("test_derived", "keyword", new Script("")))
.build(builderContext);
MappingLookup mappingLookup = new MappingLookup(
Collections.singletonList(derivedFieldMapper),
Collections.emptyList(),
Expand Down

0 comments on commit 3887cb2

Please sign in to comment.