Fix TestHnswBitVectorsFormat.testIndexAndSearchBitVectors flakiness (#13333)

This commit is contained in:
Benjamin Trent 2024-05-02 07:58:22 -04:00 committed by GitHub
parent e40e1086f5
commit 7d87a773fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ public class TestHnswBitVectorsFormat extends BaseIndexFileFormatTestCase {
byte[][] vectors = byte[][] vectors =
new byte[][] { new byte[][] {
new byte[] {(byte) 0b10101110, (byte) 0b01010111}, new byte[] {(byte) 0b10101110, (byte) 0b01010111},
new byte[] {(byte) 0b11110000, (byte) 0b00001111}, new byte[] {(byte) 0b11111000, (byte) 0b00001111},
new byte[] {(byte) 0b11001100, (byte) 0b00110011}, new byte[] {(byte) 0b11001100, (byte) 0b00110011},
new byte[] {(byte) 0b11111111, (byte) 0b00000000}, new byte[] {(byte) 0b11111111, (byte) 0b00000000},
new byte[] {(byte) 0b00000000, (byte) 0b00000000} new byte[] {(byte) 0b00000000, (byte) 0b00000000}
@ -99,7 +99,7 @@ public class TestHnswBitVectorsFormat extends BaseIndexFileFormatTestCase {
assertEquals("2", fields.document(topDocs.scoreDocs[1].doc).get("id")); assertEquals("2", fields.document(topDocs.scoreDocs[1].doc).get("id"));
assertEquals(0.625, topDocs.scoreDocs[1].score, 1e-12); assertEquals(0.625, topDocs.scoreDocs[1].score, 1e-12);
assertEquals("1", fields.document(topDocs.scoreDocs[2].doc).get("id")); assertEquals("1", fields.document(topDocs.scoreDocs[2].doc).get("id"));
assertEquals(0.5, topDocs.scoreDocs[2].score, 1e-12); assertEquals(0.5625, topDocs.scoreDocs[2].score, 1e-12);
} }
} }
} }