Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Increase `cx.condition` timeout to fix flaky test (#28822)

João Marcos4e8ecfc0c4a0
diff --git a/crates/gpui/src/app/test_context.rs b/crates/gpui/src/app/test_context.rs
index be36324c0f7..2de8a9dbbe0 100644
--- a/crates/gpui/src/app/test_context.rs
+++ b/crates/gpui/src/app/test_context.rs
@@ -589,11 +589,6 @@ impl<V> Entity<V> {
use postage::prelude::{Sink as _, Stream as _};
let (tx, mut rx) = postage::mpsc::channel(1024);
- let timeout_duration = if cfg!(target_os = "macos") {
- Duration::from_millis(100)
- } else {
- Duration::from_secs(1)
- };
let mut cx = cx.app.borrow_mut();
let subscriptions = (
@@ -615,7 +610,7 @@ impl<V> Entity<V> {
let handle = self.downgrade();
async move {
- crate::util::timeout(timeout_duration, async move {
+ crate::util::timeout(Duration::from_secs(1), async move {
loop {
{
let cx = cx.borrow();