SOLR-8621: TestMergePolicyConfig.testTieredMergePolicyConfig now randomly chooses between solrconfig-tieredmergepolicy.xml and solrconfig-tieredmergepolicyfactory.xml; solrconfig-tieredmergepolicyfactory.xml fix so that TestMergePolicyConfig.testTieredMergePolicyConfig passes.

This commit is contained in:
Christine Poerschke 2016-02-09 12:36:24 +00:00
parent b052a8f937
commit 39fd942514
2 changed files with 3 additions and 1 deletions

View File

@ -23,8 +23,10 @@
<schemaFactory class="ClassicIndexSchemaFactory"/>
<indexConfig>
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
<mergePolicyFactory class="org.apache.solr.index.TieredMergePolicyFactory">
<int name="maxMergeAtOnceExplicit">19</int>
<int name="maxMergeAtOnce">7</int>
<int name="segmentsPerTier">9</int>
<double name="noCFSRatio">0.1</double>
</mergePolicyFactory>

View File

@ -91,7 +91,7 @@ public class TestMergePolicyConfig extends SolrTestCaseJ4 {
final boolean expectCFS
= Boolean.parseBoolean(System.getProperty("useCompoundFile"));
initCore("solrconfig-tieredmergepolicy.xml","schema-minimal.xml");
initCore(random().nextBoolean() ? "solrconfig-tieredmergepolicy.xml" : "solrconfig-tieredmergepolicyfactory.xml","schema-minimal.xml");
IndexWriterConfig iwc = solrConfig.indexConfig.toIndexWriterConfig(h.getCore());
assertEquals(expectCFS, iwc.getUseCompoundFile());