mirror of https://github.com/apache/lucene.git
LUCENE-2858: Fix field caheh test (was easy, but produced millions of errors). 9 errors left...
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene2858@1237416 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6a1e2cbf0f
commit
42634f5f75
|
@ -41,7 +41,7 @@ import org.junit.AfterClass;
|
|||
import org.junit.BeforeClass;
|
||||
|
||||
public class TestFieldCache extends LuceneTestCase {
|
||||
private static IndexReader reader;
|
||||
private static AtomicIndexReader reader;
|
||||
private static int NUM_DOCS;
|
||||
private static int NUM_ORDS;
|
||||
private static String[] unicodeStrings;
|
||||
|
@ -293,11 +293,12 @@ public class TestFieldCache extends LuceneTestCase {
|
|||
public void testEmptyIndex() throws Exception {
|
||||
Directory dir = newDirectory();
|
||||
IndexWriter writer= new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)).setMaxBufferedDocs(500));
|
||||
IndexReader r = IndexReader.open(writer, true);
|
||||
writer.close();
|
||||
IndexReader r = DirectoryReader.open(dir);
|
||||
AtomicIndexReader reader = SlowCompositeReaderWrapper.wrap(r);
|
||||
FieldCache.DEFAULT.getTerms(reader, "foobar");
|
||||
FieldCache.DEFAULT.getTermsIndex(reader, "foobar");
|
||||
writer.close();
|
||||
FieldCache.DEFAULT.purge(reader);
|
||||
r.close();
|
||||
dir.close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue