File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -30,20 +30,21 @@ async test "walk sequential" {
3030async test "walk parallel" {
3131 @async .sleep (300 )
3232 let log = StringBuilder ::new ()
33+ let mut i = 0
3334 @fs .walk ("test_directory" , max_concurrency = 2 , fn (path , _ ) {
35+ i = i + 1
3436 log .write_string ("handling \{ path } \n " )
35- @async .sleep (300 )
37+ @async .sleep (if i == 1 { 200 } else { 300 } )
3638 log .write_string ("finished handling \{ path } \n " )
37- @async .sleep (100 )
3839 })
3940 inspect (
4041 log .to_string (),
4142 content = (
4243 #| handling test_directory
4344 #| handling test_directory/inner1
4445 #| finished handling test_directory
45- #| finished handling test_directory/inner1
4646 #| handling test_directory/inner1/inner2
47+ #| finished handling test_directory/inner1
4748 #| finished handling test_directory/inner1/inner2
4849 #|
4950 ),
You can’t perform that action at this time.
0 commit comments