Wait for the add_documents task

Format the code

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
This commit is contained in:
Martin Tzvetanov Grigorov 2025-05-27 14:26:29 +03:00
parent 46ff78b4ec
commit 4897ad99d0
No known key found for this signature in database
GPG key ID: 3194FD8C1AE300EF
2 changed files with 5 additions and 4 deletions

View file

@ -130,8 +130,8 @@ async fn search_with_stop_word() {
snapshot!(code, @"202 Accepted");
let documents = DOCUMENTS.clone();
index.add_documents(documents, None).await;
index.wait_task(1).await;
let (task, code) = index.add_documents(documents, None).await;
index.wait_task(task.uid()).await.succeeded();
// prefix search
index