diff --git a/crates/meili-snap/src/lib.rs b/crates/meili-snap/src/lib.rs index 975b0d47c..688c87494 100644 --- a/crates/meili-snap/src/lib.rs +++ b/crates/meili-snap/src/lib.rs @@ -11,7 +11,8 @@ use regex_lite::Regex; static SNAPSHOT_NAMES: Lazy>> = Lazy::new(Mutex::default); /// A regex to match UUIDs in messages, specifically looking for the UUID v4 format static UUID_IN_MESSAGE_RE: Lazy = Lazy::new(|| { - Regex::new(r"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}").unwrap() + Regex::new(r"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}") + .unwrap() }); /// Return the md5 hash of the given string @@ -250,9 +251,9 @@ macro_rules! json_string { #[cfg(test)] mod tests { - use uuid::Uuid; use crate as meili_snap; use crate::UUID_IN_MESSAGE_RE; + use uuid::Uuid; #[test] fn snap() { diff --git a/crates/meilisearch/tests/search/mod.rs b/crates/meilisearch/tests/search/mod.rs index bfa23054a..53e6415c5 100644 --- a/crates/meilisearch/tests/search/mod.rs +++ b/crates/meilisearch/tests/search/mod.rs @@ -130,8 +130,8 @@ async fn search_with_stop_word() { snapshot!(code, @"202 Accepted"); let documents = DOCUMENTS.clone(); - index.add_documents(documents, None).await; - index.wait_task(1).await; + let (task, code) = index.add_documents(documents, None).await; + index.wait_task(task.uid()).await.succeeded(); // prefix search index