Skip to content

Commit b8b8434

Browse files
authored
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
1 parent a8ebe2a commit b8b8434

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ public void testGetFieldMappings() throws Exception {
147147
@SuppressWarnings("unchecked")
148148
public void testSimpleGetFieldMappingsWithDefaults() throws Exception {
149149
assertAcked(prepareCreate("test").addMapping("type", getMappingForType("type")));
150-
151-
client().prepareIndex("test", "type", "1").setSource("num", 1).get();
150+
client().admin().indices().preparePutMapping("test").setType("type").setSource("num", "type=long").get();
152151

153152
GetFieldMappingsResponse response = client().admin().indices().prepareGetFieldMappings()
154153
.setFields("num", "field1", "obj.subfield").includeDefaults(true).get();

0 commit comments

Comments
 (0)