Add random delays in FakeFs

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-01-24 16:50:38 -08:00
parent 2b8685c1a2
commit 0cfb9ff1ae
6 changed files with 30 additions and 21 deletions

View file

@ -490,7 +490,7 @@ pub struct WorkspaceParams {
impl WorkspaceParams {
#[cfg(any(test, feature = "test-support"))]
pub fn test(cx: &mut MutableAppContext) -> Self {
let fs = Arc::new(project::FakeFs::new());
let fs = Arc::new(project::FakeFs::new(cx.background().clone()));
let languages = Arc::new(LanguageRegistry::new());
let http_client = client::test::FakeHttpClient::new(|_| async move {
Ok(client::http::ServerResponse::new(404))