From da01024477b5b3bae34af133d028c694a7e89b62 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Sun, 14 Nov 2010 11:01:28 +0000 Subject: [PATCH] fix intermittent fail: prevent unexpected merging git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1034975 13f79535-47bb-0310-9956-ffa450edef68 --- .../test/org/apache/lucene/index/TestIndexWriterReader.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java b/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java index c987aafedc6..7cc33ccf631 100644 --- a/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java +++ b/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java @@ -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);