[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
|
@Test
|
||||||
public void testUpdateMappingDynamicallyWhilePercolating() throws Exception {
|
public void testUpdateMappingDynamicallyWhilePercolating() throws Exception {
|
||||||
createIndex("test");
|
createIndex("test");
|
||||||
|
ensureSearchable();
|
||||||
|
|
||||||
// percolation source
|
// percolation source
|
||||||
XContentBuilder percolateDocumentSource = XContentFactory.jsonBuilder().startObject().startObject("doc")
|
XContentBuilder percolateDocumentSource = XContentFactory.jsonBuilder().startObject().startObject("doc")
|
||||||
|
@ -1749,6 +1750,7 @@ public class PercolatorTests extends ElasticsearchIntegrationTest {
|
||||||
PercolateResponse response = client().preparePercolate()
|
PercolateResponse response = client().preparePercolate()
|
||||||
.setIndices("test").setDocumentType("type1")
|
.setIndices("test").setDocumentType("type1")
|
||||||
.setSource(percolateDocumentSource).execute().actionGet();
|
.setSource(percolateDocumentSource).execute().actionGet();
|
||||||
|
assertAllSuccessful(response);
|
||||||
assertMatchCount(response, 0l);
|
assertMatchCount(response, 0l);
|
||||||
assertThat(response.getMatches(), arrayWithSize(0));
|
assertThat(response.getMatches(), arrayWithSize(0));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue