From e189b3e37b017db387a9d983e649af8882461576 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Wed, 2 Apr 2014 14:58:36 +0200 Subject: [PATCH] [TEST] Use NoMergePolicy rather than NoMergeScheduler in FreqTermsEnumTests --- .../common/lucene/index/FreqTermsEnumTests.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/elasticsearch/common/lucene/index/FreqTermsEnumTests.java b/src/test/java/org/elasticsearch/common/lucene/index/FreqTermsEnumTests.java index e12dc4aba1a24..e05ef1dc2fdac 100644 --- a/src/test/java/org/elasticsearch/common/lucene/index/FreqTermsEnumTests.java +++ b/src/test/java/org/elasticsearch/common/lucene/index/FreqTermsEnumTests.java @@ -76,7 +76,10 @@ public void setUp() throws Exception { Directory dir = newDirectory(); IndexWriterConfig conf = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())); - conf.setMergeScheduler(NoMergeScheduler.INSTANCE); // we don't want to do any merges, so we won't expunge deletes + if (frequently()) { + // we don't want to do any merges, so we won't expunge deletes + conf.setMergePolicy(randomBoolean() ? NoMergePolicy.COMPOUND_FILES : NoMergePolicy.NO_COMPOUND_FILES); + } iw = new IndexWriter(dir, conf); terms = new String[scaledRandomIntBetween(10, 300)]; for (int i = 0; i < terms.length; i++) {