File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
server/src/test/java/org/elasticsearch/index/mapper
test/framework/src/main/java/org/elasticsearch/index/mapper Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -971,4 +971,10 @@ public void testFieldTypeDefault_IndexedFalseDocValuesFalse() throws IOException
971971 assertFalse (mapper .fieldType ().isIndexed ());
972972 assertFalse (mapper .fieldType ().hasDocValuesSkipper ());
973973 }
974+
975+ @ Override
976+ protected String randomSyntheticSourceKeep () {
977+ // Only option all keeps array source in ignored source.
978+ return randomFrom ("all" );
979+ }
974980}
Original file line number Diff line number Diff line change @@ -1707,7 +1707,7 @@ public void testSyntheticSourceKeepArrays() throws IOException {
17071707 SyntheticSourceExample example = syntheticSourceSupportForKeepTests (shouldUseIgnoreMalformed ()).example (1 );
17081708 DocumentMapper mapperAll = createSytheticSourceMapperService (mapping (b -> {
17091709 b .startObject ("field" );
1710- b .field ("synthetic_source_keep" , randomFrom ( "all" )); // Only option all keeps array source.
1710+ b .field ("synthetic_source_keep" , randomSyntheticSourceKeep ( ));
17111711 example .mapping ().accept (b );
17121712 b .endObject ();
17131713 })).documentMapper ();
@@ -1726,6 +1726,10 @@ public void testSyntheticSourceKeepArrays() throws IOException {
17261726 assertThat (actual , equalTo (expected ));
17271727 }
17281728
1729+ protected String randomSyntheticSourceKeep () {
1730+ return randomFrom ("all" , "arrays" );
1731+ }
1732+
17291733 @ Override
17301734 protected final <T > T compileScript (Script script , ScriptContext <T > context ) {
17311735 return ingestScriptSupport ().compileScript (script , context );
You can’t perform that action at this time.
0 commit comments