You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2022/07/18 13:30:05 UTC

[lucene] branch branch_9x updated: Fix rare test failures of TestIndexSorting.

This is an automated email from the ASF dual-hosted git repository.

jpountz pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new e5dbf780544 Fix rare test failures of TestIndexSorting.
e5dbf780544 is described below

commit e5dbf780544a2b6564321f97cc7c0286f8c97ace
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Mon Jul 18 15:24:55 2022 +0200

    Fix rare test failures of TestIndexSorting.
    
    Sometimes the final merge might not require sorting depending on the merge
    policy configuration.
---
 lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java
index 3267bd56385..e273fb64d29 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java
@@ -188,6 +188,7 @@ public class TestIndexSorting extends LuceneTestCase {
     assertTrue(codec.numCalls > 0);
 
     // merge sort is needed
+    w.deleteAll();
     codec.numCalls = 0;
     codec.needsIndexSort = true;
     for (int i = 10; i >= 0; i--) {