[TEST] Use NoMergePolicy rather than NoMergeScheduler in FreqTermsEnumTests

This commit is contained in:
Simon Willnauer 2014-04-02 14:58:36 +02:00
parent 4ff3e1926b
commit e189b3e37b
1 changed files with 4 additions and 1 deletions

View File

@ -76,7 +76,10 @@ public class FreqTermsEnumTests extends ElasticsearchLuceneTestCase {
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++) {