LUCENE-3892: null these massive static data structures out so they can be GC'ed and wont OOM tests

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1365257 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-07-24 19:49:32 +00:00
parent 3e795bf830
commit ab2a7e389f
1 changed files with 10 additions and 0 deletions

View File

@ -43,6 +43,7 @@ import org.apache.lucene.util.Constants;
import org.apache.lucene.util.FixedBitSet;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.util._TestUtil;
import org.junit.AfterClass;
import org.junit.BeforeClass;
/* NOTE: This test focuses on the postings
@ -315,6 +316,15 @@ public class TestPostingsFormat extends LuceneTestCase {
System.out.println("TEST: done init postings; maxDocID=" + maxDocID + "; " + allTerms.size() + " total terms, across " + fieldInfos.size() + " fields");
}
}
@AfterClass
public static void afterClass() throws Exception {
allTerms = null;
fieldInfos = null;
fields = null;
fieldsLive = null;
globalLiveDocs = null;
}
// TODO maybe instead of @BeforeClass just make a single test run: build postings & index & test it?