fix test bug

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1543825 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2013-11-20 14:27:03 +00:00
parent 915977b6e8
commit 2bf8490b55
1 changed files with 3 additions and 0 deletions

View File

@ -1111,6 +1111,9 @@ public class TestIndexWriterReader extends LuceneTestCase {
if (mp instanceof TieredMergePolicy) {
TieredMergePolicy tmp = (TieredMergePolicy) mp;
tmp.setMaxMergedSegmentMB(Math.max(.01, tmp.getMaxMergedSegmentMB()));
if (tmp.getSegmentsPerTier() > 20) {
tmp.setSegmentsPerTier(20);
}
}
IndexWriter w = new IndexWriter(dir, iwc);
// Create 500 segments: