Skip to content

Commit

Permalink
fix: failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
marieaurore123 committed Dec 2, 2024
1 parent f71fd5d commit a29e37e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rig-mongodb/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,14 @@ async fn vector_search_test() {
.await
.unwrap();

if results.is_empty() {
let mut i = 1;

while results.is_empty() && i < 5 {
results = index
.top_n::<serde_json::Value>("What is a linglingdong?", 1)
.await
.expect("Failed to query vector index");
.unwrap();
i += 1;
}

let (score, _, value) = &results.first().unwrap();
Expand Down

0 comments on commit a29e37e

Please sign in to comment.