From cbadaea8f846ebf9f7abe7057ab93a6a5f07d131 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Mon, 14 Jan 2013 19:48:29 +0000 Subject: [PATCH] LUCENE-4676: Use NoMergePolicy in starvation test to prevent buffered deletes pruning git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1433079 13f79535-47bb-0310-9956-ffa450edef68 --- .../core/src/test/org/apache/lucene/search/TestNRTManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lucene/core/src/test/org/apache/lucene/search/TestNRTManager.java b/lucene/core/src/test/org/apache/lucene/search/TestNRTManager.java index e5b729af6a2..38cc749051c 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestNRTManager.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestNRTManager.java @@ -32,6 +32,7 @@ import org.apache.lucene.index.IndexDocument; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; +import org.apache.lucene.index.NoMergePolicy; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.Term; import org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase; @@ -294,6 +295,7 @@ public class TestNRTManager extends ThreadedIndexingAndSearchingTestCase { */ public void testThreadStarvationNoDeleteNRTReader() throws IOException, InterruptedException { IndexWriterConfig conf = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())); + conf.setMergePolicy(random().nextBoolean() ? NoMergePolicy.COMPOUND_FILES : NoMergePolicy.NO_COMPOUND_FILES); Directory d = newDirectory(); final CountDownLatch latch = new CountDownLatch(1); final CountDownLatch signal = new CountDownLatch(1);