git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1484146 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adrien Grand 2013-05-18 17:04:11 +00:00
parent 927308b528
commit c7d7eae2ae
1 changed files with 2 additions and 2 deletions
lucene/test-framework/src/java/org/apache/lucene/store

View File

@ -55,14 +55,14 @@ public class MockIndexOutputWrapper extends IndexOutput {
long realUsage = 0;
// Enforce disk full:
if (dir.maxSize != 0 && freeSpace < len) {
if (dir.maxSize != 0 && freeSpace <= len) {
// Compute the real disk free. This will greatly slow
// down our test but makes it more accurate:
realUsage = dir.getRecomputedActualSizeInBytes();
freeSpace = dir.maxSize - realUsage;
}
if (dir.maxSize != 0 && freeSpace < len) {
if (dir.maxSize != 0 && freeSpace <= len) {
if (freeSpace > 0) {
realUsage += freeSpace;
if (b != null) {