[TEST] Wait for shards to be allocated before running testUpdateMappingDynamicallyWhilePercolating.
If the percolate request is executed soon enough, all shards fail and the mapping is not actually updated.
This commit is contained in:
parent
9ea0e3a95b
commit
9920084ba2
|
@ -1739,6 +1739,7 @@ public class PercolatorTests extends ElasticsearchIntegrationTest {
|
|||
@Test
|
||||
public void testUpdateMappingDynamicallyWhilePercolating() throws Exception {
|
||||
createIndex("test");
|
||||
ensureSearchable();
|
||||
|
||||
// percolation source
|
||||
XContentBuilder percolateDocumentSource = XContentFactory.jsonBuilder().startObject().startObject("doc")
|
||||
|
@ -1749,6 +1750,7 @@ public class PercolatorTests extends ElasticsearchIntegrationTest {
|
|||
PercolateResponse response = client().preparePercolate()
|
||||
.setIndices("test").setDocumentType("type1")
|
||||
.setSource(percolateDocumentSource).execute().actionGet();
|
||||
assertAllSuccessful(response);
|
||||
assertMatchCount(response, 0l);
|
||||
assertThat(response.getMatches(), arrayWithSize(0));
|
||||
|
||||
|
|
Loading…
Reference in New Issue