[TEST] Fix ExistsMissingTests failures.

They were due to a combination of mappings propagation delays and the behavior
of MapperService.smartName(String) so mappings are now configured up-front.
This commit is contained in:
Adrien Grand 2014-07-01 11:24:19 +02:00
parent 60a8515fb7
commit 6a1e7b6ad0
1 changed files with 31 additions and 11 deletions

View File

@ -29,11 +29,7 @@ import org.elasticsearch.index.query.FilterBuilders;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.test.ElasticsearchIntegrationTest;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Locale;
import java.util.*;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
@ -51,6 +47,30 @@ public class ExistsMissingTests extends ElasticsearchIntegrationTest {
.field("index", randomFrom("no", "not_analyzed"))
.field("store", randomFrom("no", "yes"))
.endObject()
.startObject("properties")
.startObject("foo")
.field("type", "string")
.endObject()
.startObject("bar")
.field("type", "object")
.startObject("properties")
.startObject("foo")
.field("type", "string")
.endObject()
.startObject("bar")
.field("type", "object")
.startObject("properties")
.startObject("bar")
.field("type", "string")
.endObject()
.endObject()
.endObject()
.startObject("baz")
.field("type", "long")
.endObject()
.endObject()
.endObject()
.endObject()
.endObject()
.endObject();