Skip to content

Apache Lucene open-source search software

fix off-by-one error

Michael McCandless8068979bec10
diff --git a/src/test/org/apache/lucene/index/TestDeletionPolicy.java b/src/test/org/apache/lucene/index/TestDeletionPolicy.java
index d7d146d45ad..0373a6fe964 100644
--- a/src/test/org/apache/lucene/index/TestDeletionPolicy.java
+++ b/src/test/org/apache/lucene/index/TestDeletionPolicy.java
@@ -229,7 +229,7 @@ public class TestDeletionPolicy extends LuceneTestCase
"",
gen);
long modTime = dir.fileModified(fileName);
- assertTrue("commit point was older than " + SECONDS + " seconds but did not get deleted", lastDeleteTime - modTime < (SECONDS*1000));
+ assertTrue("commit point was older than " + SECONDS + " seconds (" + (lastDeleteTime - modTime) + " msec) but did not get deleted", lastDeleteTime - modTime <= (SECONDS*1000));
} catch (IOException e) {
// OK
break;