126126import org .elasticsearch .index .MockEngineFactoryPlugin ;
127127import org .elasticsearch .index .codec .CodecService ;
128128import org .elasticsearch .index .engine .Segment ;
129+ import org .elasticsearch .index .mapper .MappedFieldType ;
129130import org .elasticsearch .index .mapper .MapperService ;
130131import org .elasticsearch .index .mapper .MockFieldFilterPlugin ;
131132import org .elasticsearch .index .seqno .SeqNoStats ;
@@ -823,7 +824,7 @@ public void waitNoPendingTasksOnAll() throws Exception {
823824 }
824825
825826 /**
826- * Waits till a (pattern) field name mappings concretely exists on all nodes. Note, this waits for the current
827+ * Waits until mappings for the provided fields exist on all nodes. Note, this waits for the current
827828 * started shards and checks for concrete mappings.
828829 */
829830 public void assertConcreteMappingsOnAll (final String index , final String type , final String ... fieldNames ) throws Exception {
@@ -835,8 +836,8 @@ public void assertConcreteMappingsOnAll(final String index, final String type, f
835836 assertThat ("index service doesn't exists on " + node , indexService , notNullValue ());
836837 MapperService mapperService = indexService .mapperService ();
837838 for (String fieldName : fieldNames ) {
838- Collection < String > matches = mapperService .simpleMatchToFullName (fieldName );
839- assertThat ("field " + fieldName + " doesn't exists on " + node , matches , Matchers . not ( emptyIterable ()) );
839+ MappedFieldType fieldType = mapperService .fullName (fieldName );
840+ assertNotNull ("field " + fieldName + " doesn't exists on " + node , fieldType );
840841 }
841842 }
842843 assertMappingOnMaster (index , type , fieldNames );
0 commit comments