[TEST] properly wait for mappings when needed
This commit is contained in:
parent
5273410be6
commit
5c5e13abce
|
@ -133,6 +133,7 @@ public class SimpleGetFieldMappingsTests extends ElasticsearchIntegrationTest {
|
||||||
|
|
||||||
client().prepareIndex("test", "type", "1").setSource("num", 1).get();
|
client().prepareIndex("test", "type", "1").setSource("num", 1).get();
|
||||||
ensureYellow();
|
ensureYellow();
|
||||||
|
waitForConcreteMappingsOnAll("test", "type", "num"); // for num, we need to wait...
|
||||||
|
|
||||||
GetFieldMappingsResponse response = client().admin().indices().prepareGetFieldMappings().setFields("num", "field1", "subfield").includeDefaults(true).get();
|
GetFieldMappingsResponse response = client().admin().indices().prepareGetFieldMappings().setFields("num", "field1", "subfield").includeDefaults(true).get();
|
||||||
|
|
||||||
|
|
|
@ -1756,6 +1756,7 @@ public class PercolatorTests extends ElasticsearchIntegrationTest {
|
||||||
assertMatchCount(response, 0l);
|
assertMatchCount(response, 0l);
|
||||||
assertThat(response.getMatches(), arrayWithSize(0));
|
assertThat(response.getMatches(), arrayWithSize(0));
|
||||||
|
|
||||||
|
ensureYellow("test"); // wait for at least primaries allocations so concretely allocated on it
|
||||||
waitForConcreteMappingsOnAll("test", "type1", "field1", "field2");
|
waitForConcreteMappingsOnAll("test", "type1", "field1", "field2");
|
||||||
|
|
||||||
GetMappingsResponse mappingsResponse = client().admin().indices().prepareGetMappings("test").get();
|
GetMappingsResponse mappingsResponse = client().admin().indices().prepareGetMappings("test").get();
|
||||||
|
|
Loading…
Reference in New Issue