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