You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by iv...@apache.org on 2025/03/28 13:19:08 UTC
(lucene) branch branch_10x updated: Handle NaN results in TestVectorUtilSupport.testBinaryVectors (#14419)
This is an automated email from the ASF dual-hosted git repository.
ivera 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 a9ece63044d Handle NaN results in TestVectorUtilSupport.testBinaryVectors (#14419)
a9ece63044d is described below
commit a9ece63044dc51a2270765efa36540426b27353c
Author: Ignacio Vera <iv...@apache.org>
AuthorDate: Fri Mar 28 14:16:45 2025 +0100
Handle NaN results in TestVectorUtilSupport.testBinaryVectors (#14419)
---
.../lucene/internal/vectorization/TestVectorUtilSupport.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lucene/core/src/test/org/apache/lucene/internal/vectorization/TestVectorUtilSupport.java b/lucene/core/src/test/org/apache/lucene/internal/vectorization/TestVectorUtilSupport.java
index c3e5dbaf1fc..c3be45cb644 100644
--- a/lucene/core/src/test/org/apache/lucene/internal/vectorization/TestVectorUtilSupport.java
+++ b/lucene/core/src/test/org/apache/lucene/internal/vectorization/TestVectorUtilSupport.java
@@ -16,8 +16,6 @@
*/
package org.apache.lucene.internal.vectorization;
-import static org.hamcrest.Matchers.closeTo;
-
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import java.util.ArrayList;
import java.util.Arrays;
@@ -210,9 +208,10 @@ public class TestVectorUtilSupport extends BaseVectorizationTestCase {
}
private void assertFloatReturningProviders(ToDoubleFunction<VectorUtilSupport> func) {
- assertThat(
+ assertEquals(
+ func.applyAsDouble(LUCENE_PROVIDER.getVectorUtilSupport()),
func.applyAsDouble(PANAMA_PROVIDER.getVectorUtilSupport()),
- closeTo(func.applyAsDouble(LUCENE_PROVIDER.getVectorUtilSupport()), delta));
+ delta);
}
private void assertIntReturningProviders(ToIntFunction<VectorUtilSupport> func) {