diff --git a/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java b/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java index 48299d04291..df2c1157f4e 100644 --- a/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java +++ b/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java @@ -159,7 +159,8 @@ public class TranslogTests extends ESTestCase { if (deletionPolicy.pendingViewsCount() == 0) { assertThat(deletionPolicy.minTranslogGenRequired(), equalTo(genToCommit)); } - assertThat(translog.getMinFileGeneration(), equalTo(deletionPolicy.minTranslogGenRequired())); + // we may have some views closed concurrently causing the deletion policy to increase it's minTranslogGenRequired + assertThat(translog.getMinFileGeneration(), lessThanOrEqualTo(deletionPolicy.minTranslogGenRequired())); } @Override