tests: Use Server::wait_task() instead of Index::wait_task()

The code is mostly duplicated. Server::wait_task() has better handling for errors and more retries.

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
This commit is contained in:
Martin Tzvetanov Grigorov 2025-06-22 14:50:11 +03:00
parent bd2bd0f33b
commit 4de3c56121
No known key found for this signature in database
GPG key ID: 3194FD8C1AE300EF
15 changed files with 153 additions and 172 deletions

View file

@ -117,7 +117,7 @@ async fn test_both_apis() {
]);
let (value, code) = index.add_documents(documents, None).await;
snapshot!(code, @"202 Accepted");
let task = index.wait_task(value.uid()).await;
let task = server.wait_task(value.uid()).await;
snapshot!(task, @r###"
{
"uid": "[uid]",