Skip to content

Apache Lucene open-source search software

LUCENE-10092: fix test bug by forceMerging the index down to one segment

Mike McCandlessee0695eda8bc
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java b/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java
index 93658d6a6de..c9ffbabe019 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java
@@ -124,6 +124,7 @@ public class TestCheckIndex extends BaseTestCheckIndex {
tombstone.add(new NumericDocValuesField("soft_delete", 1));
w.softUpdateDocument(
new Term("id", "1"), tombstone, new NumericDocValuesField("soft_delete", 1));
+ w.forceMerge(1);
}
ByteArrayOutputStream output = new ByteArrayOutputStream();