diff --git a/crates/collab/src/db.rs b/crates/collab/src/db.rs index b14f9b14e4..e7ef0d5797 100644 --- a/crates/collab/src/db.rs +++ b/crates/collab/src/db.rs @@ -1361,7 +1361,7 @@ pub mod tests { use super::*; use anyhow::anyhow; use collections::BTreeMap; - use gpui::executor::Background; + use gpui::executor::{Background, Deterministic}; use lazy_static::lazy_static; use parking_lot::Mutex; use rand::prelude::*; @@ -1376,7 +1376,7 @@ pub mod tests { async fn test_get_users_by_ids() { for test_db in [ TestDb::postgres().await, - TestDb::fake(Arc::new(gpui::executor::Background::new())), + TestDb::fake(build_background_executor()), ] { let db = test_db.db(); @@ -1687,7 +1687,7 @@ pub mod tests { async fn test_recent_channel_messages() { for test_db in [ TestDb::postgres().await, - TestDb::fake(Arc::new(gpui::executor::Background::new())), + TestDb::fake(build_background_executor()), ] { let db = test_db.db(); let user = db.create_user("user", None, false).await.unwrap(); @@ -1726,7 +1726,7 @@ pub mod tests { async fn test_channel_message_nonces() { for test_db in [ TestDb::postgres().await, - TestDb::fake(Arc::new(gpui::executor::Background::new())), + TestDb::fake(build_background_executor()), ] { let db = test_db.db(); let user = db.create_user("user", None, false).await.unwrap(); @@ -1834,7 +1834,7 @@ pub mod tests { async fn test_add_contacts() { for test_db in [ TestDb::postgres().await, - TestDb::fake(Arc::new(gpui::executor::Background::new())), + TestDb::fake(build_background_executor()), ] { let db = test_db.db(); @@ -2836,4 +2836,8 @@ pub mod tests { Some(self) } } + + fn build_background_executor() -> Arc { + Deterministic::new(0).build_background() + } }