File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/tools/miri/tests/pass/concurrency Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,10 @@ fn check_conditional_variables_timed_wait_timeout() {
6363 let cvar = Condvar :: new ( ) ;
6464 let guard = lock. lock ( ) . unwrap ( ) ;
6565 let now = Instant :: now ( ) ;
66- let ( _guard, timeout) = cvar. wait_timeout ( guard, Duration :: from_millis ( 100 ) ) . unwrap ( ) ;
66+ let ( _guard, timeout) = cvar. wait_timeout ( guard, Duration :: from_millis ( 10 ) ) . unwrap ( ) ;
6767 assert ! ( timeout. timed_out( ) ) ;
6868 let elapsed_time = now. elapsed ( ) . as_millis ( ) ;
69- assert ! ( 100 <= elapsed_time && elapsed_time <= 1000 ) ;
69+ assert ! ( 10 <= elapsed_time && elapsed_time <= 1000 ) ;
7070}
7171
7272/// Test that signaling a conditional variable when waiting with a timeout works
@@ -79,7 +79,7 @@ fn check_conditional_variables_timed_wait_notimeout() {
7979 let guard = lock. lock ( ) . unwrap ( ) ;
8080
8181 let handle = thread:: spawn ( move || {
82- thread:: sleep ( Duration :: from_millis ( 100 ) ) ; // Make sure the other thread is waiting by the time we call `notify`.
82+ thread:: sleep ( Duration :: from_millis ( 1 ) ) ; // Make sure the other thread is waiting by the time we call `notify`.
8383 let ( _lock, cvar) = & * pair2;
8484 cvar. notify_one ( ) ;
8585 } ) ;
You can’t perform that action at this time.
0 commit comments