LUCENE-3095: fix test bug causing OOME

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1103077 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2011-05-14 12:08:19 +00:00
parent 36dd35d18c
commit b86a8401c6
1 changed files with 2 additions and 1 deletions

View File

@ -2139,7 +2139,7 @@ public class TestIndexWriter extends LuceneTestCase {
while(!finish) {
try {
while(true) {
while(!finish) {
if (w != null) {
w.close();
w = null;
@ -2157,6 +2157,7 @@ public class TestIndexWriter extends LuceneTestCase {
}
}
w.close();
w = null;
_TestUtil.checkIndex(dir);
IndexReader.open(dir, true).close();