[TEST] Wait if flush is ongoing otherwise test sometimes fails due to FlushNotAllowedEngineException
This commit is contained in:
parent
6e85023482
commit
06b1484d96
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue