Fix rare test failures of TestIndexSorting.

Sometimes the final merge might not require sorting depending on the merge
policy configuration.
This commit is contained in:
Adrien Grand 2022-07-18 15:24:55 +02:00
parent 30a7c52e6c
commit 0364402b30
1 changed files with 1 additions and 0 deletions

View File

@ -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--) {