Apache Lucene open-source search software
Specify deltas when checking float values for corrections in Lucene102BinaryQuantizedVectorsFormat (#15222)
Simon Cooper0336829000fe
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene102/TestLucene102BinaryQuantizedVectorsFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene102/TestLucene102BinaryQuantizedVectorsFormat.javaindex 87decff9ff9..1b5f206ddfe 100644--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene102/TestLucene102BinaryQuantizedVectorsFormat.java+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene102/TestLucene102BinaryQuantizedVectorsFormat.java@@ -173,7 +173,14 @@ public class TestLucene102BinaryQuantizedVectorsFormat extends BaseKnnVectorsForcentroid);packAsBinary(quantizedVector, expectedVector);assertArrayEquals(expectedVector, qvectorValues.vectorValue(docIndexIterator.index()));- assertEquals(corrections, qvectorValues.getCorrectiveTerms(docIndexIterator.index()));++ var actualCorrections = qvectorValues.getCorrectiveTerms(docIndexIterator.index());+ assertEquals(corrections.lowerInterval(), actualCorrections.lowerInterval(), 1e-5);+ assertEquals(corrections.upperInterval(), actualCorrections.upperInterval(), 1e-5);+ assertEquals(+ corrections.additionalCorrection(), actualCorrections.additionalCorrection(), 1e-5);+ assertEquals(+ corrections.quantizedComponentSum(), actualCorrections.quantizedComponentSum());}}}