Make sure next_scan_complete resolves
Sometimes the scan state could change so quickly that the consumer wouldn't notice that it ever went to a scanning state before going back to an idle state, hence never resolving. Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
ff5561d402
commit
02bd9c8420
@@ -3060,7 +3060,8 @@ mod tests {
|
||||
|
||||
tree.flush_fs_events(&app).await;
|
||||
fs::remove_file(dir.path().join("file1")).unwrap();
|
||||
app.read(|ctx| tree.read(ctx).next_scan_complete()).await;
|
||||
tree.update(&mut app, |tree, ctx| tree.next_scan_complete(ctx))
|
||||
.await;
|
||||
|
||||
model.update(&mut app, |buffer, _| {
|
||||
assert_eq!(*events.borrow(), &[Event::FileHandleChanged]);
|
||||
|
||||
Reference in New Issue
Block a user