Skip to content

Commit d027f71

Browse files
committed
[TEST] Moving mapping creation to create index call, this will make sure that in the test the mapping is always available on all nodes.
1 parent 3f446c3 commit d027f71

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/test/java/org/elasticsearch/get/GetActionTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,11 @@ public void testGetFields_metaData() throws Exception {
768768
@Test
769769
public void testGetFields_nonLeafField() throws Exception {
770770
client().admin().indices().prepareCreate("my-index")
771+
.addMapping("my-type1", jsonBuilder().startObject().startObject("my-type1").startObject("properties")
772+
.startObject("field1").startObject("properties")
773+
.startObject("field2").field("type", "string").endObject()
774+
.endObject().endObject()
775+
.endObject().endObject().endObject())
771776
.setSettings(ImmutableSettings.settingsBuilder().put("index.refresh_interval", -1))
772777
.get();
773778

0 commit comments

Comments
 (0)