fix intermittent fail: prevent unexpected merging

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

View File

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