Skip to content

Commit

Permalink
Fix flaky faiss integration tests (opensearch-project#1635)
Browse files Browse the repository at this point in the history
  • Loading branch information
naveentatikonda authored Apr 20, 2024
1 parent a2bb6cc commit 730b7e4
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 730b7e4

Please sign in to comment.