[TEST] Wait if flush is ongoing otherwise test sometimes fails due to FlushNotAllowedEngineException

This commit is contained in:
Simon Willnauer 2015-10-22 16:49:37 +02:00
parent 6e85023482
commit 06b1484d96
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ public class FlushBlocksIT extends ESIntegTestCase {
for (String blockSetting : Arrays.asList(SETTING_BLOCKS_READ, SETTING_BLOCKS_WRITE)) {
try {
enableIndexBlock("test", blockSetting);
FlushResponse response = client().admin().indices().prepareFlush("test").execute().actionGet();
FlushResponse response = client().admin().indices().prepareFlush("test").setWaitIfOngoing(true).execute().actionGet();
assertNoFailures(response);
assertThat(response.getSuccessfulShards(), equalTo(numShards.totalNumShards));
} finally {