diff --git a/crates/index-scheduler/src/scheduler/test.rs b/crates/index-scheduler/src/scheduler/test.rs index de12cb25d..8e7b7e34d 100644 --- a/crates/index-scheduler/src/scheduler/test.rs +++ b/crates/index-scheduler/src/scheduler/test.rs @@ -899,7 +899,7 @@ fn create_and_list_index() { index_scheduler.index("kefir").unwrap(); let list = index_scheduler.get_paginated_indexes_stats(&AuthFilter::default(), 0, 20).unwrap(); - snapshot!(json_string!(list, { "[1][0][1].created_at" => "[date]", "[1][0][1].updated_at" => "[date]" }), @r#" + snapshot!(json_string!(list, { "[1][0][1].created_at" => "[date]", "[1][0][1].updated_at" => "[date]" }), @r###" [ 1, [ @@ -907,8 +907,8 @@ fn create_and_list_index() { "kefir", { "number_of_documents": 0, - "database_size": 24576, - "used_database_size": 8192, + "database_size": 98304, + "used_database_size": 32768, "primary_key": null, "field_distribution": {}, "created_at": "[date]", @@ -917,5 +917,5 @@ fn create_and_list_index() { ] ] ] - "#); + "###); } diff --git a/crates/meilisearch/tests/index/get_index.rs b/crates/meilisearch/tests/index/get_index.rs index baa379243..70acbcdb1 100644 --- a/crates/meilisearch/tests/index/get_index.rs +++ b/crates/meilisearch/tests/index/get_index.rs @@ -2,7 +2,7 @@ use crate::json; use meili_snap::{json_string, snapshot}; use serde_json::Value; -use crate::common::Server; +use crate::common::{shared_does_not_exists_index, Server}; #[actix_rt::test] async fn create_and_get_index() { @@ -26,13 +26,12 @@ async fn create_and_get_index() { #[actix_rt::test] async fn error_get_unexisting_index() { - let server = Server::new_shared(); - let index = server.unique_index(); + let index = shared_does_not_exists_index().await; let (response, code) = index.get().await; let expected_response = json!({ - "message": format!("Index `{}` not found.", index.uid), + "message": "Index `DOES_NOT_EXISTS` not found.", "code": "index_not_found", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#index_not_found" @@ -57,10 +56,10 @@ async fn list_multiple_indexes() { let index1 = server.unique_index(); let index2 = server.unique_index(); - let (task1, _) = index1.create(None).await; - let (_task2, _) = index2.create(Some("key")).await; + let (_task1, _) = index1.create(None).await; + let (task2, _) = index2.create(Some("key")).await; - index1.wait_task(task1.uid()).await.succeeded(); + index1.wait_task(task2.uid()).await.succeeded(); let (response, code) = server.list_indexes(None, None).await; dbg!(response.clone());