diff --git a/Cargo.lock b/Cargo.lock index 8a3e319a57..8d22eeafab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18025,6 +18025,7 @@ dependencies = [ "command_palette_hooks", "db", "editor", + "env_logger 0.11.8", "futures 0.3.31", "git_ui", "gpui", diff --git a/crates/gpui_macros/src/test.rs b/crates/gpui_macros/src/test.rs index 2c52149897..adb27f42ea 100644 --- a/crates/gpui_macros/src/test.rs +++ b/crates/gpui_macros/src/test.rs @@ -167,6 +167,7 @@ fn generate_test_function( )); cx_teardowns.extend(quote!( dispatcher.run_until_parked(); + #cx_varname.executor().forbid_parking(); #cx_varname.quit(); dispatcher.run_until_parked(); )); @@ -232,7 +233,7 @@ fn generate_test_function( cx_teardowns.extend(quote!( drop(#cx_varname_lock); dispatcher.run_until_parked(); - #cx_varname.update(|cx| { cx.quit() }); + #cx_varname.update(|cx| { cx.background_executor().forbid_parking(); cx.quit(); }); dispatcher.run_until_parked(); )); continue; @@ -247,6 +248,7 @@ fn generate_test_function( )); cx_teardowns.extend(quote!( dispatcher.run_until_parked(); + #cx_varname.executor().forbid_parking(); #cx_varname.quit(); dispatcher.run_until_parked(); )); diff --git a/crates/vim/Cargo.toml b/crates/vim/Cargo.toml index 9fb5c46564..434b14b07c 100644 --- a/crates/vim/Cargo.toml +++ b/crates/vim/Cargo.toml @@ -24,6 +24,7 @@ command_palette.workspace = true command_palette_hooks.workspace = true db.workspace = true editor.workspace = true +env_logger.workspace = true futures.workspace = true gpui.workspace = true itertools.workspace = true diff --git a/crates/vim/src/test/vim_test_context.rs b/crates/vim/src/test/vim_test_context.rs index b8988b1d1f..904e48e5a3 100644 --- a/crates/vim/src/test/vim_test_context.rs +++ b/crates/vim/src/test/vim_test_context.rs @@ -15,6 +15,7 @@ impl VimTestContext { if cx.has_global::() { return; } + env_logger::try_init().ok(); cx.update(|cx| { let settings = SettingsStore::test(cx); cx.set_global(settings);