[TEST] wait until mappings are added to cluster state to make sure they are persisted

This commit is contained in:
Britta Weber 2015-03-06 10:42:29 +01:00
parent 0c254e9832
commit 6c79636985
1 changed files with 4 additions and 0 deletions

View File

@ -107,6 +107,10 @@ public class GatewayIndexStateTests extends ElasticsearchIntegrationTest {
logger.info("--> indexing a simple document");
client().prepareIndex("test", "type1", "1").setSource("field1", "value1").execute().actionGet();
// we need this until we have https://github.com/elasticsearch/elasticsearch/issues/8688
// the test rarely fails else because the master does not apply the new mapping quick enough and it is lost
waitForConcreteMappingsOnAll("test", "type1", "field1");
logger.info("--> closing test index...");
client().admin().indices().prepareClose("test").execute().actionGet();