make test less evil: don't use random codec, even for the last IndexWriter

This commit is contained in:
Mike McCandless 2016-09-16 09:54:17 -04:00
parent 5d6b7fffc3
commit 9c6d34858e
1 changed files with 6 additions and 3 deletions

View File

@ -176,9 +176,12 @@ public class TestBoolean2 extends LuceneTestCase {
mulFactor *= 2;
} while(docCount < 3000 * NUM_FILLER_DOCS);
RandomIndexWriter w = new RandomIndexWriter(random(), dir2,
newIndexWriterConfig(new MockAnalyzer(random()))
.setMaxBufferedDocs(TestUtil.nextInt(random(), 50, 1000)));
iwc = newIndexWriterConfig(new MockAnalyzer(random()));
iwc.setMaxBufferedDocs(TestUtil.nextInt(random(), 50, 1000));
// randomized codecs are sometimes too costly for this test:
iwc.setCodec(Codec.forName("Lucene62"));
RandomIndexWriter w = new RandomIndexWriter(random(), dir2, iwc);
doc = new Document();
doc.add(new Field("field2", "xxx", ft));
for(int i=0;i<NUM_EXTRA_DOCS/2;i++) {