mirror of https://github.com/apache/lucene.git
GITHUB-11761 (part 2): Fix unit tests to cleany work with new TierMergePolicy delete pct default (#11841)
Co-authored-by: Marc D'Mello <dmellomd@amazon.com>
This commit is contained in:
parent
83891d9a61
commit
3a608995a1
|
@ -1341,11 +1341,12 @@ public class TestIndexWriterDelete extends LuceneTestCase {
|
|||
w.addDocument(doc);
|
||||
w.addDocument(doc);
|
||||
w.addDocument(doc);
|
||||
w.addDocument(doc);
|
||||
w.addDocument(doc);
|
||||
doc.add(new StringField("id", "1", Field.Store.YES));
|
||||
w.addDocument(doc);
|
||||
w.close();
|
||||
iwc = new IndexWriterConfig(new MockAnalyzer(random()));
|
||||
((TieredMergePolicy) iwc.getMergePolicy()).setDeletesPctAllowed(33.0);
|
||||
iwc.setOpenMode(IndexWriterConfig.OpenMode.APPEND);
|
||||
w = new IndexWriter(d, iwc);
|
||||
IndexReader r = DirectoryReader.open(w, false, false);
|
||||
|
|
|
@ -310,9 +310,9 @@ public class TestTieredMergePolicy extends BaseMergePolicyTestCase {
|
|||
((1024.0 * 1024.0)); // fudge it up, we're trying to catch egregious errors and segbytes
|
||||
// don't really reflect the number for original merges.
|
||||
tmp.setMaxMergedSegmentMB(mbSize);
|
||||
tmp.setDeletesPctAllowed(33.0);
|
||||
conf.setMaxBufferedDocs(100);
|
||||
conf.setMergePolicy(tmp);
|
||||
conf.setMergeScheduler(new SerialMergeScheduler());
|
||||
|
||||
final IndexWriter w = new IndexWriter(dir, conf);
|
||||
|
||||
|
|
Loading…
Reference in New Issue