Skip to content

Commit

Permalink
Disable dynamic mapping in testSimpleGetFieldMappingsWithDefaults (el…
Browse files Browse the repository at this point in the history
…astic#38045)

Since elastic#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 elastic#31140
Closes elastic#37928
  • Loading branch information
dnhatn committed Feb 1, 2019
1 parent 7077cb3 commit 57f9cda
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ public void testGetFieldMappings() throws Exception {
@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();
Expand Down

0 comments on commit 57f9cda

Please sign in to comment.