mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 20:15:07 +08:00
fix flaky test
This commit is contained in:
parent
1d910dbb42
commit
97f35de41f
@ -94,13 +94,21 @@ async fn return_update_status_of_pushed_documents() {
|
||||
];
|
||||
|
||||
let mut update_ids = Vec::new();
|
||||
let mut bodies = bodies.into_iter();
|
||||
|
||||
let url = "/indexes/test/documents?primaryKey=title";
|
||||
let (response, status_code) = server.post_request(&url, bodies.next().unwrap()).await;
|
||||
assert_eq!(status_code, 202);
|
||||
let update_id = response["updateId"].as_u64().unwrap();
|
||||
update_ids.push(update_id);
|
||||
server.wait_update_id(update_id).await;
|
||||
|
||||
let url = "/indexes/test/documents";
|
||||
for body in bodies {
|
||||
let (response, status_code) = server.post_request(&url, body).await;
|
||||
assert_eq!(status_code, 202);
|
||||
let update_id = response["updateId"].as_u64().unwrap();
|
||||
update_ids.push(update_id);
|
||||
let (response, status_code) = server.post_request(&url, body).await;
|
||||
assert_eq!(status_code, 202);
|
||||
let update_id = response["updateId"].as_u64().unwrap();
|
||||
update_ids.push(update_id);
|
||||
}
|
||||
|
||||
// 2. Fetch the status of index.
|
||||
|
Loading…
Reference in New Issue
Block a user