mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 12:54:26 +01:00
improve the test and try to understand the issue happening on windows
This commit is contained in:
parent
be69ab320d
commit
9350a7b017
@ -1026,10 +1026,16 @@ async fn test_task_queue_is_full() {
|
|||||||
"###);
|
"###);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let (res, _code) = server.create_index(json!({ "uid": "doggo" })).await;
|
let (res, code) = server.create_index(json!({ "uid": "doggo" })).await;
|
||||||
if res["taskUid"] == json!(null) {
|
if code == 422 {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if res["taskUid"] == json!(null) {
|
||||||
|
panic!(
|
||||||
|
"Encountered the strange case:\n{}",
|
||||||
|
serde_json::to_string_pretty(&res).unwrap()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let (result, code) = server.create_index(json!({ "uid": "doggo" })).await;
|
let (result, code) = server.create_index(json!({ "uid": "doggo" })).await;
|
||||||
@ -1058,10 +1064,16 @@ async fn test_task_queue_is_full() {
|
|||||||
|
|
||||||
// we're going to fill up the queue once again
|
// we're going to fill up the queue once again
|
||||||
loop {
|
loop {
|
||||||
let (res, _code) = server.create_index(json!({ "uid": "doggo" })).await;
|
let (res, code) = server.create_index(json!({ "uid": "doggo" })).await;
|
||||||
if res["taskUid"] == json!(null) {
|
if code == 422 {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if res["taskUid"] == json!(null) {
|
||||||
|
panic!(
|
||||||
|
"Encountered the strange case:\n{}",
|
||||||
|
serde_json::to_string_pretty(&res).unwrap()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// But we should NOT be able to register this task because it doesn't match any tasks
|
// But we should NOT be able to register this task because it doesn't match any tasks
|
||||||
|
Loading…
Reference in New Issue
Block a user