mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-06 20:56:31 +00:00
Update test
This commit is contained in:
@ -221,7 +221,7 @@ async fn snapshotception_issue_4653() {
|
|||||||
"enqueuedAt": "[date]"
|
"enqueuedAt": "[date]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
let task = server.wait_task(task.uid()).await.succeeded();
|
server.wait_task(task.uid()).await.succeeded();
|
||||||
|
|
||||||
let temp = tempfile::tempdir().unwrap();
|
let temp = tempfile::tempdir().unwrap();
|
||||||
let snapshot_path = snapshot_dir.path().to_owned().join("db.snapshot");
|
let snapshot_path = snapshot_dir.path().to_owned().join("db.snapshot");
|
||||||
@ -229,16 +229,22 @@ async fn snapshotception_issue_4653() {
|
|||||||
let options = Opt { import_snapshot: Some(snapshot_path), ..default_settings(temp.path()) };
|
let options = Opt { import_snapshot: Some(snapshot_path), ..default_settings(temp.path()) };
|
||||||
let snapshot_server = Server::new_with_options(options).await.unwrap();
|
let snapshot_server = Server::new_with_options(options).await.unwrap();
|
||||||
|
|
||||||
// The snapshot creation task should NOT be spawned => task queue is empty
|
// The snapshot creation task should NOT be spawned again => task is succeeded
|
||||||
let (tasks, code) = snapshot_server.tasks().await;
|
let (task, code) = snapshot_server.get_task(task.uid()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(tasks, @r#"
|
snapshot!(json_string!(task, { ".enqueuedAt" => "[date]" }), @r#"
|
||||||
{
|
{
|
||||||
"results": [],
|
"uid": 0,
|
||||||
"total": 0,
|
"batchUid": 0,
|
||||||
"limit": 20,
|
"indexUid": null,
|
||||||
"from": null,
|
"status": "succeeded",
|
||||||
"next": null
|
"type": "snapshotCreation",
|
||||||
|
"canceledBy": null,
|
||||||
|
"error": null,
|
||||||
|
"duration": null,
|
||||||
|
"enqueuedAt": "[date]",
|
||||||
|
"startedAt": null,
|
||||||
|
"finishedAt": null
|
||||||
}
|
}
|
||||||
"#);
|
"#);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user