From 0625d08e4e474057c0af0a7b2e9f2458d94a62ff Mon Sep 17 00:00:00 2001 From: Mahmoud Rawas Date: Tue, 7 Jan 2025 11:49:35 +1100 Subject: [PATCH] adding a function toextract batch_uid from json and modifying the get_batch interface for easier call - did not work, so falling back to hard coded batch id for now. --- crates/meilisearch/tests/batches/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/meilisearch/tests/batches/mod.rs b/crates/meilisearch/tests/batches/mod.rs index 9a4fefa1a..d72656321 100644 --- a/crates/meilisearch/tests/batches/mod.rs +++ b/crates/meilisearch/tests/batches/mod.rs @@ -986,7 +986,7 @@ async fn test_summarized_index_swap() { ])) .await; server.wait_task(task.uid()).await; - let (batch, _) = server.get_batch(task.uid().to_u32().unwrap()).await; + let (batch, _) = server.get_batch(1).await; assert_json_snapshot!(batch, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r#" @@ -1029,8 +1029,7 @@ async fn test_summarized_batch_cancelation() { index.wait_task(task.uid()).await.succeeded(); let (task, _status_code) = server.cancel_tasks("uids=0").await; index.wait_task(task.uid()).await.succeeded(); - //TODO: create a get_batch function interface that accepts u64, and remove the following cast. - let (batch, _) = index.get_batch(task.uid().to_u32().unwrap()).await; + let (batch, _) = index.get_batch(1).await; assert_json_snapshot!(batch, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r#"