mirror of https://github.com/apache/lucene.git
LUCENE-2758: fix intermittent fail
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1034804 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5f4872152d
commit
6e28ea8fff
|
@ -114,9 +114,11 @@ public class TestPerFieldCodecSupport extends LuceneTestCase {
|
|||
Directory dir = newDirectory();
|
||||
CodecProvider provider = new MockCodecProvider();
|
||||
IndexWriterConfig iwconf = newIndexWriterConfig(TEST_VERSION_CURRENT,
|
||||
new MockAnalyzer()).setOpenMode(OpenMode.CREATE).setCodecProvider(
|
||||
provider);
|
||||
new MockAnalyzer()).setOpenMode(OpenMode.CREATE).setCodecProvider(provider);
|
||||
iwconf.setMaxBufferedDocs(IndexWriterConfig.DISABLE_AUTO_FLUSH);
|
||||
((LogMergePolicy) iwconf.getMergePolicy()).setMergeFactor(10);
|
||||
IndexWriter writer = newWriter(dir, iwconf);
|
||||
|
||||
addDocs(writer, 10);
|
||||
writer.commit();
|
||||
assertQuery(new Term("content", "aaa"), dir, 10, provider);
|
||||
|
@ -133,6 +135,8 @@ public class TestPerFieldCodecSupport extends LuceneTestCase {
|
|||
.setOpenMode(OpenMode.APPEND).setCodecProvider(provider);
|
||||
((LogMergePolicy) iwconf.getMergePolicy()).setUseCompoundFile(false);
|
||||
((LogMergePolicy) iwconf.getMergePolicy()).setUseCompoundDocStore(false);
|
||||
((LogMergePolicy) iwconf.getMergePolicy()).setMergeFactor(10);
|
||||
iwconf.setMaxBufferedDocs(IndexWriterConfig.DISABLE_AUTO_FLUSH);
|
||||
|
||||
provider = new MockCodecProvider2(); // uses standard for field content
|
||||
iwconf.setCodecProvider(provider);
|
||||
|
|
Loading…
Reference in New Issue