mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 21:32:40 +00:00
Tweak durations in fsevent unit test to reduce odds of timeout
This commit is contained in:
parent
3d6336b12a
commit
c867cfa917
1 changed files with 2 additions and 2 deletions
|
@ -345,12 +345,12 @@ mod tests {
|
||||||
// Delay the call to `run` in order to make sure we don't miss any events that occur
|
// Delay the call to `run` in order to make sure we don't miss any events that occur
|
||||||
// between creating the `EventStream` and calling `run`.
|
// between creating the `EventStream` and calling `run`.
|
||||||
thread::spawn(move || {
|
thread::spawn(move || {
|
||||||
thread::sleep(Duration::from_millis(250));
|
thread::sleep(Duration::from_millis(100));
|
||||||
stream.run(move |events| tx.send(events.to_vec()).is_ok())
|
stream.run(move |events| tx.send(events.to_vec()).is_ok())
|
||||||
});
|
});
|
||||||
|
|
||||||
fs::write(path.join("new-file"), "").unwrap();
|
fs::write(path.join("new-file"), "").unwrap();
|
||||||
let events = rx.recv_timeout(Duration::from_millis(500)).unwrap();
|
let events = rx.recv_timeout(Duration::from_millis(800)).unwrap();
|
||||||
let event = events.last().unwrap();
|
let event = events.last().unwrap();
|
||||||
assert_eq!(event.path, path.join("new-file"));
|
assert_eq!(event.path, path.join("new-file"));
|
||||||
assert!(event.flags.contains(StreamFlags::ITEM_CREATED));
|
assert!(event.flags.contains(StreamFlags::ITEM_CREATED));
|
||||||
|
|
Loading…
Reference in a new issue