diff --git a/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsTests.java b/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsTests.java index f25f6936d7d..da81d8438ec 100644 --- a/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsTests.java +++ b/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsTests.java @@ -133,6 +133,7 @@ public class SimpleGetFieldMappingsTests extends ElasticsearchIntegrationTest { client().prepareIndex("test", "type", "1").setSource("num", 1).get(); ensureYellow(); + waitForConcreteMappingsOnAll("test", "type", "num"); // for num, we need to wait... GetFieldMappingsResponse response = client().admin().indices().prepareGetFieldMappings().setFields("num", "field1", "subfield").includeDefaults(true).get(); diff --git a/src/test/java/org/elasticsearch/percolator/PercolatorTests.java b/src/test/java/org/elasticsearch/percolator/PercolatorTests.java index a30d3ed2cfa..3bfffde0f0b 100644 --- a/src/test/java/org/elasticsearch/percolator/PercolatorTests.java +++ b/src/test/java/org/elasticsearch/percolator/PercolatorTests.java @@ -1756,6 +1756,7 @@ public class PercolatorTests extends ElasticsearchIntegrationTest { assertMatchCount(response, 0l); assertThat(response.getMatches(), arrayWithSize(0)); + ensureYellow("test"); // wait for at least primaries allocations so concretely allocated on it waitForConcreteMappingsOnAll("test", "type1", "field1", "field2"); GetMappingsResponse mappingsResponse = client().admin().indices().prepareGetMappings("test").get();