Pass a reference to TestAppContext in tests
This allows us to drop the context *after* we ran all futures to completion and that's crucial otherwise we'll never drop entities and/or flush effects.
This commit is contained in:
@@ -627,7 +627,7 @@ pub mod tests {
|
||||
use util::post_inc;
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_get_users_by_ids(cx: TestAppContext) {
|
||||
async fn test_get_users_by_ids(cx: &mut TestAppContext) {
|
||||
for test_db in [TestDb::postgres(), TestDb::fake(cx.background())] {
|
||||
let db = test_db.db();
|
||||
|
||||
@@ -667,7 +667,7 @@ pub mod tests {
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_recent_channel_messages(cx: TestAppContext) {
|
||||
async fn test_recent_channel_messages(cx: &mut TestAppContext) {
|
||||
for test_db in [TestDb::postgres(), TestDb::fake(cx.background())] {
|
||||
let db = test_db.db();
|
||||
let user = db.create_user("user", false).await.unwrap();
|
||||
@@ -703,7 +703,7 @@ pub mod tests {
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_channel_message_nonces(cx: TestAppContext) {
|
||||
async fn test_channel_message_nonces(cx: &mut TestAppContext) {
|
||||
for test_db in [TestDb::postgres(), TestDb::fake(cx.background())] {
|
||||
let db = test_db.db();
|
||||
let user = db.create_user("user", false).await.unwrap();
|
||||
|
||||
+300
-370
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user