mirror of https://github.com/apache/lucene.git
Fix test after #12549.
This commit is contained in:
parent
4576ae09e8
commit
85f5d3bb0b
|
@ -2404,11 +2404,12 @@ public class TestIndexWriter extends LuceneTestCase {
|
|||
writer.deleteDocuments(new Term("id", "xyz"));
|
||||
assertTrue(writer.hasUncommittedChanges());
|
||||
|
||||
// Must commit, waitForMerges, commit again, to be
|
||||
// certain that hasUncommittedChanges returns false:
|
||||
writer.commit();
|
||||
writer.waitForMerges();
|
||||
writer.commit();
|
||||
// Must commit and wait for merges as long as the commit triggers merges to be certain that
|
||||
// hasUncommittedChanges returns false
|
||||
do {
|
||||
writer.waitForMerges();
|
||||
writer.commit();
|
||||
} while (writer.hasPendingMerges());
|
||||
assertFalse(writer.hasUncommittedChanges());
|
||||
writer.close();
|
||||
|
||||
|
|
Loading…
Reference in New Issue