Use simulate_random_delay when polling snapshot only in tests
Co-Authored-By: Nathan Sobo <nathan@zed.dev> Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
Max Brunsfeld
parent
a25f21df39
commit
efe7f61128
@@ -386,6 +386,7 @@ impl Worktree {
|
||||
if worktree.poll_task.is_none() {
|
||||
worktree.poll_task = Some(cx.spawn_weak(|this, mut cx| async move {
|
||||
if is_fake_fs {
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
cx.background().simulate_random_delay().await;
|
||||
} else {
|
||||
smol::Timer::after(Duration::from_millis(100)).await;
|
||||
|
||||
Reference in New Issue
Block a user