Disable dynamic mapping in testSimpleGetFieldMappingsWithDefaults (#38045)

Since #31140 we no longer require acking on the dynamic mapping of index
requests. Thus, a returned mapping from a get mapping request does not
necessarily contain the dynamic updates from the index request. This
commit replaces the dynamic mapping update with a manual put mapping.

Relates #31140
Closes #37928
This commit is contained in:
Nhat Nguyen 2019-01-31 21:01:41 -05:00 committed by GitHub
parent a8ebe2a217
commit b8b843476d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -147,8 +147,7 @@ public class SimpleGetFieldMappingsIT extends ESIntegTestCase {
@SuppressWarnings("unchecked")
public void testSimpleGetFieldMappingsWithDefaults() throws Exception {
assertAcked(prepareCreate("test").addMapping("type", getMappingForType("type")));
client().prepareIndex("test", "type", "1").setSource("num", 1).get();
client().admin().indices().preparePutMapping("test").setType("type").setSource("num", "type=long").get();
GetFieldMappingsResponse response = client().admin().indices().prepareGetFieldMappings()
.setFields("num", "field1", "obj.subfield").includeDefaults(true).get();