LUCENE-9935: Fix testRandomStoredFieldsWithIndexSort

Skip verifying if the list of live ids is empty
This commit is contained in:
Nhat Nguyen 2021-05-16 18:00:04 -04:00
parent eaaf13aa86
commit 406aef8a4b
1 changed files with 3 additions and 0 deletions

View File

@ -899,6 +899,9 @@ public abstract class BaseStoredFieldsFormatTestCase extends BaseIndexFileFormat
List<String> addedIds = new ArrayList<>();
Runnable verifyStoreFields =
() -> {
if (addedIds.isEmpty()) {
return;
}
try (DirectoryReader reader = maybeWrapWithMergingReader(iw.getReader())) {
IndexSearcher searcher = new IndexSearcher(reader);
int iters = TestUtil.nextInt(random(), 1, 10);