diff --git a/lucene/src/test/org/apache/lucene/search/function/TestValueSource.java b/lucene/src/test/org/apache/lucene/search/function/TestValueSource.java index 131d1a322dc..f2d314c0fb2 100644 --- a/lucene/src/test/org/apache/lucene/search/function/TestValueSource.java +++ b/lucene/src/test/org/apache/lucene/search/function/TestValueSource.java @@ -30,6 +30,7 @@ public class TestValueSource extends LuceneTestCase { public void testMultiValueSource() throws Exception { Directory dir = newDirectory(); IndexWriter w = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setMergePolicy(newLogMergePolicy())); + ((LogMergePolicy) w.getConfig().getMergePolicy()).setMergeFactor(_TestUtil.nextInt(random, 2, 16)); Document doc = new Document(); Field f = newField("field", "", Field.Store.NO, Field.Index.NOT_ANALYZED); doc.add(f);