You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by zh...@apache.org on 2024/02/22 10:10:15 UTC

(lucene) branch branch_9_10 updated: Fix test failure in TestReqOptSumScorer.testFilterRandomRareOpt (#13122)

This is an automated email from the ASF dual-hosted git repository.

zhangchao pushed a commit to branch branch_9_10
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/branch_9_10 by this push:
     new 0723d4579bd Fix test failure in TestReqOptSumScorer.testFilterRandomRareOpt (#13122)
0723d4579bd is described below

commit 0723d4579bdee676051db3eb85b81542352c84ab
Author: Zhang Chao <80...@qq.com>
AuthorDate: Thu Feb 22 14:11:07 2024 +0800

    Fix test failure in TestReqOptSumScorer.testFilterRandomRareOpt (#13122)
---
 .../src/java/org/apache/lucene/tests/search/CheckHits.java            | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lucene/test-framework/src/java/org/apache/lucene/tests/search/CheckHits.java b/lucene/test-framework/src/java/org/apache/lucene/tests/search/CheckHits.java
index e01fc3877a8..3c6bb891c92 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/tests/search/CheckHits.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/tests/search/CheckHits.java
@@ -793,6 +793,10 @@ public class CheckHits {
         assertTrue(s2 == null || s2.iterator().nextDoc() == DocIdSetIterator.NO_MORE_DOCS);
         continue;
       }
+      if (s2 == null) {
+        assertTrue(s1.iterator().nextDoc() == DocIdSetIterator.NO_MORE_DOCS);
+        continue;
+      }
       TwoPhaseIterator twoPhase1 = s1.twoPhaseIterator();
       TwoPhaseIterator twoPhase2 = s2.twoPhaseIterator();
       DocIdSetIterator approx1 = twoPhase1 == null ? s1.iterator() : twoPhase1.approximation();