mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
#4840 - Partial fix - Confirm task success after waiting for it - continued, few missing cases.
This commit is contained in:
parent
bf19f86e38
commit
15062e7dba
16 changed files with 91 additions and 91 deletions
|
@ -30,7 +30,7 @@ async fn attribute_scale_search() {
|
|||
let index = server.index("test");
|
||||
|
||||
let (task,_status_code) = index.add_documents(DOCUMENTS.clone(), None).await;
|
||||
index.wait_task(task.uid()).await;
|
||||
index.wait_task(task.uid()).await.succeeded();
|
||||
|
||||
let (response, code) = index
|
||||
.update_settings(json!({
|
||||
|
@ -39,7 +39,7 @@ async fn attribute_scale_search() {
|
|||
}))
|
||||
.await;
|
||||
assert_eq!("202", code.as_str(), "{:?}", response);
|
||||
index.wait_task(response.uid()).await;
|
||||
index.wait_task(response.uid()).await.succeeded();
|
||||
|
||||
// the expected order is [1, 3, 2] instead of [3, 1, 2]
|
||||
// because the attribute scale doesn't make the difference between 1 and 3.
|
||||
|
@ -103,7 +103,7 @@ async fn attribute_scale_phrase_search() {
|
|||
let index = server.index("test");
|
||||
|
||||
let (task,_status_code) = index.add_documents(DOCUMENTS.clone(), None).await;
|
||||
index.wait_task(task.uid()).await;
|
||||
index.wait_task(task.uid()).await.succeeded();
|
||||
|
||||
let (task, _code) = index
|
||||
.update_settings(json!({
|
||||
|
@ -111,7 +111,7 @@ async fn attribute_scale_phrase_search() {
|
|||
"rankingRules": ["words", "typo", "proximity"],
|
||||
}))
|
||||
.await;
|
||||
index.wait_task(task.uid()).await;
|
||||
index.wait_task(task.uid()).await.succeeded();
|
||||
|
||||
// the expected order is [1, 3] instead of [3, 1]
|
||||
// because the attribute scale doesn't make the difference between 1 and 3.
|
||||
|
@ -171,7 +171,7 @@ async fn word_scale_set_and_reset() {
|
|||
let index = server.index("test");
|
||||
|
||||
let (task,_status_code) = index.add_documents(DOCUMENTS.clone(), None).await;
|
||||
index.wait_task(task.uid()).await;
|
||||
index.wait_task(task.uid()).await.succeeded();
|
||||
|
||||
// Set and reset the setting ensuring the swap between the 2 settings is applied.
|
||||
let (update_task1, _code) = index
|
||||
|
@ -180,7 +180,7 @@ async fn word_scale_set_and_reset() {
|
|||
"rankingRules": ["words", "typo", "proximity"],
|
||||
}))
|
||||
.await;
|
||||
index.wait_task(update_task1.uid()).await;
|
||||
index.wait_task(update_task1.uid()).await.succeeded();
|
||||
|
||||
let (update_task2, _code) = index
|
||||
.update_settings(json!({
|
||||
|
@ -188,7 +188,7 @@ async fn word_scale_set_and_reset() {
|
|||
"rankingRules": ["words", "typo", "proximity"],
|
||||
}))
|
||||
.await;
|
||||
index.wait_task(update_task2.uid()).await;
|
||||
index.wait_task(update_task2.uid()).await.succeeded();
|
||||
|
||||
// [3, 1, 2]
|
||||
index
|
||||
|
@ -286,7 +286,7 @@ async fn attribute_scale_default_ranking_rules() {
|
|||
let index = server.index("test");
|
||||
|
||||
let (task,_status_code) = index.add_documents(DOCUMENTS.clone(), None).await;
|
||||
index.wait_task(task.uid()).await;
|
||||
index.wait_task(task.uid()).await.succeeded();
|
||||
|
||||
let (response, code) = index
|
||||
.update_settings(json!({
|
||||
|
@ -294,7 +294,7 @@ async fn attribute_scale_default_ranking_rules() {
|
|||
}))
|
||||
.await;
|
||||
assert_eq!("202", code.as_str(), "{:?}", response);
|
||||
index.wait_task(response.uid()).await;
|
||||
index.wait_task(response.uid()).await.succeeded();
|
||||
|
||||
// the expected order is [3, 1, 2]
|
||||
index
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue