Apache Lucene open-source search software
TestVectorUtilSupport increase delta for larger vector sizes (#15443)
Tommaso Teofili311c0a815248
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.javaindex 78280e7e4c3..2e31b865631 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@@ -306,10 +306,11 @@ public class TestVectorUtilSupport extends BaseVectorizationTestCase {}private void assertFloatReturningProviders(ToDoubleFunction<VectorUtilSupport> func) {- assertEquals(- func.applyAsDouble(LUCENE_PROVIDER.getVectorUtilSupport()),- func.applyAsDouble(PANAMA_PROVIDER.getVectorUtilSupport()),- delta);+ double luceneProviderResults = func.applyAsDouble(LUCENE_PROVIDER.getVectorUtilSupport());+ double panamaProviderResults = func.applyAsDouble(PANAMA_PROVIDER.getVectorUtilSupport());+ double delta =+ Math.max(this.delta, this.delta * Math.max(luceneProviderResults, panamaProviderResults));+ assertEquals(luceneProviderResults, panamaProviderResults, delta);}private void assertIntReturningProviders(ToIntFunction<VectorUtilSupport> func) {