1
0
Эх сурвалжийг харах

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

Simon Willnauer 10 жил өмнө
parent
commit
06b1484d96

+ 1 - 1
core/src/test/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.java

@@ -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 {