You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by to...@apache.org on 2025/04/03 07:27:33 UTC

(lucene) branch branch_10x updated: Fix TestHnswQueueSaturationCollector#testEarlyExitRelation with k==0 (#14434)

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

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


The following commit(s) were added to refs/heads/branch_10x by this push:
     new 70ca495151b Fix TestHnswQueueSaturationCollector#testEarlyExitRelation with k==0 (#14434)
70ca495151b is described below

commit 70ca495151bc176079770e9381042a03814d2afd
Author: Tommaso Teofili <to...@elastic.co>
AuthorDate: Thu Apr 3 09:25:45 2025 +0200

    Fix TestHnswQueueSaturationCollector#testEarlyExitRelation with k==0 (#14434)
    
    (cherry picked from commit f0a615f7bf9ae6229831dec727986c56b9ad6cd7)
---
 .../test/org/apache/lucene/search/TestHnswQueueSaturationCollector.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lucene/core/src/test/org/apache/lucene/search/TestHnswQueueSaturationCollector.java b/lucene/core/src/test/org/apache/lucene/search/TestHnswQueueSaturationCollector.java
index 9f6a98f3812..37d01903413 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestHnswQueueSaturationCollector.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestHnswQueueSaturationCollector.java
@@ -85,7 +85,7 @@ public class TestHnswQueueSaturationCollector extends LuceneTestCase {
   public void testEarlyExitRelation() {
     Random random = random();
     int numDocs = 10000;
-    int k = random.nextInt(100);
+    int k = random.nextInt(1, 100);
     KnnCollector delegate = new TopKnnCollector(k, random.nextInt(numDocs));
     HnswQueueSaturationCollector queueSaturationCollector =
         new HnswQueueSaturationCollector(delegate, 0.5, 1);