mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 21:13:02 +00:00
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:
parent
a25f21df39
commit
efe7f61128
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue