diff --git a/server/src/test/java/org/elasticsearch/index/shard/IndexShardIT.java b/server/src/test/java/org/elasticsearch/index/shard/IndexShardIT.java index a15c6c26cdd..b0c13415330 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/IndexShardIT.java +++ b/server/src/test/java/org/elasticsearch/index/shard/IndexShardIT.java @@ -857,7 +857,7 @@ public class IndexShardIT extends ESSingleNodeTestCase { } } - public void testLimitNumberOfRetainingTranslogFiles() throws Exception { + public void testLimitNumberOfRetainedTranslogFiles() throws Exception { String indexName = "test"; int translogRetentionTotalFiles = randomIntBetween(0, 50); Settings.Builder settings = Settings.builder() @@ -890,7 +890,7 @@ public class IndexShardIT extends ESSingleNodeTestCase { shard.rollTranslogGeneration(); } } - client().admin().indices().prepareFlush(indexName).get(); + client().admin().indices().prepareFlush(indexName).setForce(true).setWaitIfOngoing(true).get(); checkTranslog.run(); }