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 8255b47e3bc..4dd7b2e99b7 100644 --- a/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java +++ b/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java @@ -2301,7 +2301,7 @@ public class TranslogTests extends ESTestCase { } // the view generation could be -1 if no commit has been performed final long max = Math.max(1, Math.min(lastCommittedGeneration, viewGeneration)); - for (long g = max; g < translog.currentFileGeneration(); g++) { + for (long g = max; g <= translog.currentFileGeneration(); g++) { assertFileIsPresent(translog, g); } }