Skip to content

Commit

Permalink
Remove incorrect assertion in CollapsingTopDocsCollectorSearchAfterTests
Browse files Browse the repository at this point in the history
This assertion was simply wrong, but took time to catch as it was very rarely
triggered. The test already checks the correct assertion at an earlier time.

Fixes #75736.
  • Loading branch information
jtibshirani committed Jul 28, 2021
1 parent 368e2e0 commit ace7ac8
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,11 @@ private <T extends Comparable<T>> void assertSearchCollapse(CollapsingDocValuesP
currentValue = fieldDoc.fields[0];
}

if (docsWithMissingField == false) {
assertEquals(expectedNumGroups, collapseTopFieldDocs.scoreDocs.length - 1);
assertEquals(topDocs.scoreDocs.length - 1, topDocsIndex);
for (; topDocsIndex < topDocs.scoreDocs.length; topDocsIndex++) {
FieldDoc fieldDoc = (FieldDoc) topDocs.scoreDocs[topDocsIndex];
assertEquals(fieldDoc.fields[0], currentValue);
}

w.close();
reader.close();
dir.close();
Expand Down

0 comments on commit ace7ac8

Please sign in to comment.