mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-16 00:07:28 +01:00
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.
This commit is contained in:
parent
9269086fda
commit
0625d08e4e
@ -986,7 +986,7 @@ async fn test_summarized_index_swap() {
|
|||||||
]))
|
]))
|
||||||
.await;
|
.await;
|
||||||
server.wait_task(task.uid()).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,
|
assert_json_snapshot!(batch,
|
||||||
{ ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" },
|
{ ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" },
|
||||||
@r#"
|
@r#"
|
||||||
@ -1029,8 +1029,7 @@ async fn test_summarized_batch_cancelation() {
|
|||||||
index.wait_task(task.uid()).await.succeeded();
|
index.wait_task(task.uid()).await.succeeded();
|
||||||
let (task, _status_code) = server.cancel_tasks("uids=0").await;
|
let (task, _status_code) = server.cancel_tasks("uids=0").await;
|
||||||
index.wait_task(task.uid()).await.succeeded();
|
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(1).await;
|
||||||
let (batch, _) = index.get_batch(task.uid().to_u32().unwrap()).await;
|
|
||||||
assert_json_snapshot!(batch,
|
assert_json_snapshot!(batch,
|
||||||
{ ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" },
|
{ ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" },
|
||||||
@r#"
|
@r#"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user