mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-15 13:58:36 +02:00
Formatting
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
This commit is contained in:
parent
ae912c4c3f
commit
e7a60555d6
2 changed files with 12 additions and 3 deletions
|
@ -265,7 +265,11 @@ impl Index<'_, Shared> {
|
|||
/// You cannot modify the content of a shared index, thus the delete_document_by_filter call
|
||||
/// must fail. If the task successfully enqueue itself, we'll wait for the task to finishes,
|
||||
/// and if it succeed the function will panic.
|
||||
pub async fn delete_document_by_filter_fail<State>(&self, body: Value, waiter: &Server<State>) -> (Value, StatusCode) {
|
||||
pub async fn delete_document_by_filter_fail<State>(
|
||||
&self,
|
||||
body: Value,
|
||||
waiter: &Server<State>,
|
||||
) -> (Value, StatusCode) {
|
||||
let (mut task, code) = self._delete_document_by_filter(body).await;
|
||||
if code.is_success() {
|
||||
task = waiter.wait_task(task.uid()).await;
|
||||
|
@ -293,7 +297,11 @@ impl Index<'_, Shared> {
|
|||
(task, code)
|
||||
}
|
||||
|
||||
pub async fn update_index_fail<State>(&self, primary_key: Option<&str>, waiter: &Server<State>) -> (Value, StatusCode) {
|
||||
pub async fn update_index_fail<State>(
|
||||
&self,
|
||||
primary_key: Option<&str>,
|
||||
waiter: &Server<State>,
|
||||
) -> (Value, StatusCode) {
|
||||
let (mut task, code) = self._update(primary_key).await;
|
||||
if code.is_success() {
|
||||
task = waiter.wait_task(task.uid()).await;
|
||||
|
|
|
@ -7,7 +7,8 @@ use crate::json;
|
|||
async fn delete_one_document_unexisting_index() {
|
||||
let server = Server::new_shared();
|
||||
let index = shared_does_not_exists_index().await;
|
||||
let (task, code) = index.delete_document_by_filter_fail(json!({"filter": "a = b"}), server).await;
|
||||
let (task, code) =
|
||||
index.delete_document_by_filter_fail(json!({"filter": "a = b"}), server).await;
|
||||
assert_eq!(code, 202);
|
||||
|
||||
server.wait_task(task.uid()).await.failed();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue