File tree Expand file tree Collapse file tree 1 file changed +12
-15
lines changed Expand file tree Collapse file tree 1 file changed +12
-15
lines changed Original file line number Diff line number Diff line change 1717
1818use crate :: * ;
1919use anyhow:: Result ;
20+ use futures:: TryStreamExt ;
2021use log:: warn;
2122use opendal:: raw:: { Access , OpDelete } ;
2223
@@ -180,22 +181,18 @@ async fn test_blocking_remove_all_with_objects(
180181 }
181182
182183 op. delete_with ( & parent) . recursive ( true ) . await ?;
183- let list = op. list_with ( & parent) . recursive ( true ) . await ?;
184- for entry in list {
185- println ! ( "{:?}" , entry) ;
186- }
187184
188- // let found = op
189- // .lister_with(&format!("{parent}/"))
190- // .recursive(true)
191- // .await
192- // .expect("list must succeed")
193- // .try_next()
194- // .await
195- // .expect("list must succeed")
196- // .is_some();
197-
198- // assert!(!found, "all objects should be removed");
185+ let found = op
186+ . lister_with ( & format ! ( "{parent}/" ) )
187+ . recursive ( true )
188+ . await
189+ . expect ( "list must succeed" )
190+ . try_next ( )
191+ . await
192+ . expect ( "list must succeed" )
193+ . is_some ( ) ;
194+
195+ assert ! ( !found, "all objects should be removed" ) ;
199196
200197 Ok ( ( ) )
201198}
You can’t perform that action at this time.
0 commit comments