Skip to content

Commit dcbd83b

Browse files
committed
Use the shiny new wait_idle in another racy test.
1 parent d8847ea commit dcbd83b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/store/fs/gc.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ mod tests {
192192
use std::{
193193
io::{self},
194194
path::Path,
195-
time::Duration,
196195
};
197196

198197
use bao_tree::{io::EncodeError, ChunkNum};
@@ -300,7 +299,7 @@ mod tests {
300299
let outboard_path = options.outboard_path(&bh);
301300
let sizes_path = options.sizes_path(&bh);
302301
let bitfield_path = options.bitfield_path(&bh);
303-
tokio::time::sleep(Duration::from_millis(100)).await; // allow for some time for the file to be written
302+
store.wait_idle().await?;
304303
assert!(data_path.exists());
305304
assert!(outboard_path.exists());
306305
assert!(sizes_path.exists());

0 commit comments

Comments
 (0)