From e7db5d0638972cce856f234c0ee6afa6ab049cdf Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 24 Jan 2024 12:28:45 -0700 Subject: [PATCH] Use run_until_parked instead of condition Avoids spurious failures when the CI server is going slow --- crates/zed/src/zed.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index a8a76b92a9cd20fd1c921e49aa422f65ec23001e..d294eeae9c1fc8a3b7c6eedf1b1260b91825be09 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -1513,10 +1513,10 @@ mod tests { .as_fake() .insert_file("/root/a.txt", "changed".to_string()) .await; - editor - .condition::(cx, |editor, cx| editor.has_conflict(cx)) - .await; + + cx.run_until_parked(); cx.read(|cx| assert!(editor.is_dirty(cx))); + cx.read(|cx| assert!(editor.has_conflict(cx))); let save_task = window .update(cx, |workspace, cx| {