From 67fd3b08ef5993ded169e7062c767942abc81cfe Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 5 Apr 2023 18:35:43 +0200 Subject: [PATCH] wait until all tasks are processed before running our dump integration tests --- meilisearch/tests/dumps/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meilisearch/tests/dumps/mod.rs b/meilisearch/tests/dumps/mod.rs index 1deb2de2a..31fa49b60 100644 --- a/meilisearch/tests/dumps/mod.rs +++ b/meilisearch/tests/dumps/mod.rs @@ -1121,6 +1121,12 @@ async fn import_dump_v5() { assert_eq!(indexes["results"][1]["uid"], json!("test2")); assert_eq!(indexes["results"][0]["primaryKey"], json!("id")); + // before doing anything we're going to wait until all the tasks in the dump have finished processing + let result = server.tasks_filter("statuses=enqueued,processing").await.0; + for task in result["results"].as_array().unwrap() { + server.wait_task(task["uid"].as_u64().unwrap()).await; + } + let expected_stats = json!({ "numberOfDocuments": 10, "isIndexing": false,