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 elastic#75736.
  • Loading branch information
jtibshirani authored and ywangd committed Jul 30, 2021
1 parent d1e107e commit f082ebc
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 f082ebc

Please sign in to comment.