From dad3cbb9605d802a32ed413719e1acb0babd8adc Mon Sep 17 00:00:00 2001 From: Max Linke Date: Wed, 1 May 2024 21:49:18 +0200 Subject: [PATCH] Enable random_channel_buffer_tests to run on Linux (#10863) With this patch applied I can see the following line in the test output: test tests::random_channel_buffer_tests::test_random_channel_buffers has been running for over 60 seconds Without it I run in a failure with 'Invalid keystroke `cmk-,` Release Notes: - N/A --------- Co-authored-by: Max Linke Co-authored-by: Marshall Bowers --- crates/collab/src/tests/test_server.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/collab/src/tests/test_server.rs b/crates/collab/src/tests/test_server.rs index f189fd22db..6708660479 100644 --- a/crates/collab/src/tests/test_server.rs +++ b/crates/collab/src/tests/test_server.rs @@ -271,6 +271,12 @@ impl TestServer { node_runtime: FakeNodeRuntime::new(), }); + let os_keymap = if cfg!(target_os = "linux") { + "keymaps/default-linux.json" + } else { + "keymaps/default-macos.json" + }; + cx.update(|cx| { theme::init(theme::LoadThemes::JustBase, cx); Project::init(&client, cx); @@ -285,7 +291,7 @@ impl TestServer { file_finder::init(cx); menu::init(); remote_projects::init(client.clone(), cx); - settings::KeymapFile::load_asset("keymaps/default-macos.json", cx).unwrap(); + settings::KeymapFile::load_asset(os_keymap, cx).unwrap(); }); client