mirror of https://github.com/apache/lucene.git
LUCENE-5708: fix test bug
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1598497 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
43be0a77b5
commit
19b80d1afe
|
@ -22,11 +22,11 @@ import org.apache.lucene.document.Document;
|
|||
import org.apache.lucene.document.Field;
|
||||
import org.apache.lucene.document.FieldType;
|
||||
import org.apache.lucene.document.TextField;
|
||||
import org.apache.lucene.index.FieldInfo;
|
||||
import org.apache.lucene.index.FieldInfo.IndexOptions;
|
||||
import org.apache.lucene.index.FieldInfo;
|
||||
import org.apache.lucene.index.IndexWriter;
|
||||
import org.apache.lucene.index.IndexWriterConfig;
|
||||
import org.apache.lucene.index.IndexWriterConfig.OpenMode;
|
||||
import org.apache.lucene.index.IndexWriterConfig;
|
||||
import org.apache.lucene.index.RandomIndexWriter;
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
|
@ -35,6 +35,7 @@ import org.apache.lucene.util.TestUtil;
|
|||
/**
|
||||
* Tests special cases of BlockPostingsFormat
|
||||
*/
|
||||
|
||||
public class TestBlockPostingsFormat2 extends LuceneTestCase {
|
||||
Directory dir;
|
||||
RandomIndexWriter iw;
|
||||
|
@ -54,6 +55,7 @@ public class TestBlockPostingsFormat2 extends LuceneTestCase {
|
|||
iw.shutdown();
|
||||
TestUtil.checkIndex(dir); // for some extra coverage, checkIndex before we forceMerge
|
||||
IndexWriterConfig iwc = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
|
||||
iwc.setCodec(TestUtil.alwaysPostingsFormat(new Lucene41PostingsFormat()));
|
||||
iwc.setOpenMode(OpenMode.APPEND);
|
||||
IndexWriter iw = new IndexWriter(dir, iwc);
|
||||
iw.forceMerge(1);
|
||||
|
|
Loading…
Reference in New Issue