From 6fb36ed30e9bd3768b9a9686606198029d6172b9 Mon Sep 17 00:00:00 2001 From: JWSong Date: Tue, 25 Jun 2024 23:54:27 +0900 Subject: [PATCH] get rid of the redundant info in document_addition_with_huge_int_primary_key --- meilisearch/tests/documents/add_documents.rs | 29 ++------------------ 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/meilisearch/tests/documents/add_documents.rs b/meilisearch/tests/documents/add_documents.rs index 49e5af95e..85fc61503 100644 --- a/meilisearch/tests/documents/add_documents.rs +++ b/meilisearch/tests/documents/add_documents.rs @@ -1053,22 +1053,9 @@ async fn document_addition_with_huge_int_primary_key() { ]); let (response, code) = index.add_documents(documents, Some("primary")).await; snapshot!(code, @"202 Accepted"); - snapshot!(json_string!(response, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }), - @r###" - { - "taskUid": 0, - "indexUid": "test", - "status": "enqueued", - "type": "documentAdditionOrUpdate", - "enqueuedAt": "[date]" - } - "###); - index.wait_task(0).await; - - let (response, code) = index.get_task(0).await; - snapshot!(code, @"200 OK"); - snapshot!(json_string!(response, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }), + let response = index.wait_task(response.uid()).await; + snapshot!(response, @r###" { "uid": 0, @@ -1088,18 +1075,6 @@ async fn document_addition_with_huge_int_primary_key() { } "###); - let (response, code) = index.get().await; - snapshot!(code, @"200 OK"); - snapshot!(json_string!(response, { ".createdAt" => "[date]", ".updatedAt" => "[date]" }), - @r###" - { - "uid": "test", - "createdAt": "[date]", - "updatedAt": "[date]", - "primaryKey": "primary" - } - "###); - let (response, code) = index.get_document(14630868576586246730u64, None).await; snapshot!(code, @"200 OK"); snapshot!(json_string!(response),