LUCENE-10647: Fix TestMergeSchedulerExternal failures (#1011)

Ensure mergeScheduler.sync() gets called before we rollback the writer.
This commit is contained in:
Vigya Sharma 2022-07-11 02:23:17 -07:00 committed by GitHub
parent c06b98262c
commit 128869d63a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -134,7 +134,13 @@ public class TestMergeSchedulerExternal extends LuceneTestCase {
for (int i = 0; i < 20; i++) {
writer.addDocument(doc);
}
} catch (
@SuppressWarnings("unused")
IllegalStateException ise) {
// OK
}
try {
((MyMergeScheduler) writer.getConfig().getMergeScheduler()).sync();
} catch (
@SuppressWarnings("unused")