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 949f3cc258b..8255b47e3bc 100644 --- a/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java +++ b/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java @@ -2273,7 +2273,7 @@ public class TranslogTests extends ESTestCase { for (long g = 0; g < committedGeneration; g++) { assertFileDeleted(translog, g); } - for (long g = committedGeneration; g < translog.currentFileGeneration(); g++) { + for (long g = committedGeneration; g <= translog.currentFileGeneration(); g++) { assertFileIsPresent(translog, g); } }