Skip to content

Commit 0a7f703

Browse files
authored
Stop asserting on the max number of merged segments in TestTieredMergePolicy#testPartialMerge. (apache#14259)
This assertion isn't right as `TieredMergePolicy` has become more sophisticated with the introduction of `targetSearchConcurrency` and different merging rules for merges below the floor size. Closes apache#14255
1 parent a20ae1b commit 0a7f703

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lucene/core/src/test/org/apache/lucene/index/TestTieredMergePolicy.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,18 +215,13 @@ public void testPartialMerge() throws Exception {
215215
conf.setMergePolicy(tmp);
216216
conf.setMaxBufferedDocs(2);
217217
tmp.setSegmentsPerTier(6);
218-
tmp.setFloorSegmentMB(Double.MIN_VALUE);
219218

220219
IndexWriter w = new IndexWriter(dir, conf);
221-
int maxCount = 0;
222220
final int numDocs = TestUtil.nextInt(random(), 20, 100);
223221
for (int i = 0; i < numDocs; i++) {
224222
Document doc = new Document();
225223
doc.add(newTextField("content", "aaa " + (i % 4), Field.Store.NO));
226224
w.addDocument(doc);
227-
int count = w.getSegmentCount();
228-
maxCount = Math.max(count, maxCount);
229-
assertTrue("count=" + count + " maxCount=" + maxCount, count >= maxCount - 6);
230225
}
231226

232227
w.flush(true, true);

0 commit comments

Comments
 (0)