From 76a8293cc6d3acfef5b2cc73b1b0f7f45b60afe0 Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Thu, 31 Jul 2025 23:05:03 -0400 Subject: [PATCH] editor_tests: Fix for potential race loading editor languages (#35453) Fix for potential race when loading HTML and JS languages (JS is slower). Wait for both to load before continue tests. Observed failure on linux: [job](https://github.com/zed-industries/zed/actions/runs/16662438526/job/47162345259) as part of https://github.com/zed-industries/zed/pull/35436 ``` thread 'editor_tests::test_autoclose_with_embedded_language' panicked at crates/editor/src/editor_tests.rs:8724:8: assertion failed: `(left == right)`: unexpected buffer text Diff < left / right > : <> <> ``` Inserted `<` incorrect gets paired bracket inserted `>`. I believe because the JS language injection hasn't fully loaded. Release Notes: - N/A --- crates/editor/src/editor_tests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rs index 503fe2abc3..1a4f444275 100644 --- a/crates/editor/src/editor_tests.rs +++ b/crates/editor/src/editor_tests.rs @@ -8612,6 +8612,7 @@ async fn test_autoclose_with_embedded_language(cx: &mut TestAppContext) { cx.language_registry().add(html_language.clone()); cx.language_registry().add(javascript_language.clone()); + cx.executor().run_until_parked(); cx.update_buffer(|buffer, cx| { buffer.set_language(Some(html_language), cx);