fix intermittent fail: prevent unexpected merging

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1034975 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2010-11-14 11:01:28 +00:00
parent 3a994f36ad
commit da01024477
1 changed files with 3 additions and 0 deletions

View File

@ -128,6 +128,9 @@ public class TestIndexWriterReader extends LuceneTestCase {
Directory dir1 = newDirectory();
IndexWriter writer = new IndexWriter(dir1, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer()));
// test relies on no merges happening below:
((LogMergePolicy) writer.getMergePolicy()).setMergeFactor(10);
writer.setInfoStream(infoStream);
// create the index
createIndexNoClose(!optimize, "index1", writer);