From f81ccc6f4c751efb7e9c76b20a89536b44c53848 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Fri, 25 Mar 2011 17:38:16 +0000 Subject: [PATCH] force SMS to workaround overly pedantic test failure git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1085485 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/index/TestIndexWriterMergePolicy.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lucene/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java b/lucene/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java index 8b05149e3bd..5533438fcc8 100755 --- a/lucene/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java +++ b/lucene/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java @@ -131,7 +131,7 @@ public class TestIndexWriterMergePolicy extends LuceneTestCase { IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer()) - .setMaxBufferedDocs(101).setMergePolicy(new LogDocMergePolicy())); + .setMaxBufferedDocs(101).setMergePolicy(new LogDocMergePolicy()).setMergeScheduler(new SerialMergeScheduler())); // leftmost* segment has 1 doc // rightmost* segment has 100 docs @@ -153,7 +153,7 @@ public class TestIndexWriterMergePolicy extends LuceneTestCase { ldmp.setMergeFactor(10); writer = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer()).setOpenMode( - OpenMode.APPEND).setMaxBufferedDocs(10).setMergePolicy(ldmp).setMergeScheduler(new ConcurrentMergeScheduler())); + OpenMode.APPEND).setMaxBufferedDocs(10).setMergePolicy(ldmp).setMergeScheduler(new SerialMergeScheduler())); // merge policy only fixes segments on levels where merges // have been triggered, so check invariants after all adds