mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +08:00
make a test more reliable
This commit is contained in:
parent
a524dfb713
commit
79c7f65c30
@ -200,11 +200,14 @@ async fn search_with_filter_string_notation() {
|
|||||||
let server = Server::new().await;
|
let server = Server::new().await;
|
||||||
let index = server.index("test");
|
let index = server.index("test");
|
||||||
|
|
||||||
index.update_settings(json!({"filterableAttributes": ["title"]})).await;
|
let (_, code) = index.update_settings(json!({"filterableAttributes": ["title"]})).await;
|
||||||
|
meili_snap::snapshot!(code, @"202 Accepted");
|
||||||
|
|
||||||
let documents = DOCUMENTS.clone();
|
let documents = DOCUMENTS.clone();
|
||||||
index.add_documents(documents, None).await;
|
let (_, code) = index.add_documents(documents, None).await;
|
||||||
index.wait_task(1).await;
|
meili_snap::snapshot!(code, @"202 Accepted");
|
||||||
|
let res = index.wait_task(1).await;
|
||||||
|
meili_snap::snapshot!(res["status"], @r###""succeeded""###);
|
||||||
|
|
||||||
index
|
index
|
||||||
.search(
|
.search(
|
||||||
@ -220,11 +223,15 @@ async fn search_with_filter_string_notation() {
|
|||||||
|
|
||||||
let index = server.index("nested");
|
let index = server.index("nested");
|
||||||
|
|
||||||
|
let (_, code) =
|
||||||
index.update_settings(json!({"filterableAttributes": ["cattos", "doggos.age"]})).await;
|
index.update_settings(json!({"filterableAttributes": ["cattos", "doggos.age"]})).await;
|
||||||
|
meili_snap::snapshot!(code, @"202 Accepted");
|
||||||
|
|
||||||
let documents = NESTED_DOCUMENTS.clone();
|
let documents = NESTED_DOCUMENTS.clone();
|
||||||
index.add_documents(documents, None).await;
|
let (_, code) = index.add_documents(documents, None).await;
|
||||||
index.wait_task(3).await;
|
meili_snap::snapshot!(code, @"202 Accepted");
|
||||||
|
let res = index.wait_task(3).await;
|
||||||
|
meili_snap::snapshot!(res["status"], @r###""succeeded""###);
|
||||||
|
|
||||||
index
|
index
|
||||||
.search(
|
.search(
|
||||||
|
Loading…
Reference in New Issue
Block a user