Skip to content

Commit

Permalink
Fix flaky faiss integration tests (#1635) (#1637)
Browse files Browse the repository at this point in the history
(cherry picked from commit 730b7e4)
Signed-off-by: Naveen Tatikonda <[email protected]>

Co-authored-by: Naveen Tatikonda <[email protected]>
  • Loading branch information
1 parent 529c5de commit 579bbb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/java/org/opensearch/knn/index/FaissIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public void testEndToEnd_whenMethodIsHNSWFlatAndHasDeletedDocs_thenSucceed() {

final Set<Integer> docIdsToBeDeleted = new HashSet<>();
while (docIdsToBeDeleted.size() < 10) {
docIdsToBeDeleted.add(randomInt(testData.indexData.docs.length));
docIdsToBeDeleted.add(randomInt(testData.indexData.docs.length - 1));
}

for (Integer id : docIdsToBeDeleted) {
Expand Down Expand Up @@ -741,6 +741,7 @@ public void testIVFSQFP16_whenIndexedAndQueried_thenSucceed() {
.field(KNN_ENGINE, FAISS_NAME)
.field(METHOD_PARAMETER_SPACE_TYPE, "l2")
.startObject(PARAMETERS)
.field(METHOD_PARAMETER_NPROBES, 4)
.startObject(METHOD_ENCODER_PARAMETER)
.field(NAME, ENCODER_SQ)
.startObject(PARAMETERS)
Expand Down

0 comments on commit 579bbb1

Please sign in to comment.