fix false positive test failure

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@889911 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2009-12-12 10:06:29 +00:00
parent 53ce286a25
commit e98e9dd23c
2 changed files with 11 additions and 6 deletions

View File

@ -42,7 +42,7 @@
<property name="Name" value="Lucene"/>
<property name="dev.version" value="3.1-dev"/>
<property name="version" value="${dev.version}"/>
<property name="compatibility.tag" value="lucene_3_0_back_compat_tests_20091208"/>
<property name="compatibility.tag" value="lucene_3_0_back_compat_tests_20091212"/>
<property name="spec.version" value="${version}"/>
<property name="year" value="2000-${current.year}"/>
<property name="final.name" value="lucene-${name}-${version}"/>

View File

@ -2333,6 +2333,12 @@ public class TestIndexWriter extends LuceneTestCase {
fail("did not hit disk full");
} catch (IOException ioe) {
}
// Make sure once disk space is avail again, we can
// cleanly close:
dir.setMaxSizeInBytes(0);
writer.close(false);
dir.close();
}
// LUCENE-1130: make sure immediate disk full on creating
@ -2368,11 +2374,10 @@ public class TestIndexWriter extends LuceneTestCase {
assertTrue("hit unexpected Throwable", threads[i].error == null);
}
try {
writer.close(false);
} catch (IOException ioe) {
}
// Make sure once disk space is avail again, we can
// cleanly close:
dir.setMaxSizeInBytes(0);
writer.close(false);
dir.close();
}
}