File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -562,17 +562,17 @@ mod test {
562
562
} ) ;
563
563
564
564
// Wait for four activations of our task. (This is three periods.) That
565
- // should take between 300ms and 400ms. Allow extra time for a busy
566
- // system .
565
+ // would usually take between 300ms and 400ms, but allow plenty of time
566
+ // as a buffer .
567
567
let start = Instant :: now ( ) ;
568
568
let wall_start = Utc :: now ( ) ;
569
569
wait_until_count ( rx1. clone ( ) , 4 ) . await ;
570
570
assert ! ( * rx1. borrow( ) == 4 || * rx1. borrow( ) == 5 ) ;
571
571
let duration = start. elapsed ( ) ;
572
572
println ! ( "rx1 -> 3 took {:?}" , duration) ;
573
573
assert ! (
574
- duration. as_millis ( ) < 1250 ,
575
- "took longer than 1.25s to activate our \
574
+ duration < Duration :: from_secs ( 30 ) ,
575
+ "took longer than 30s to activate our \
576
576
every-100ms-task three times"
577
577
) ;
578
578
assert ! ( duration. as_millis( ) >= 300 ) ;
You can’t perform that action at this time.
0 commit comments