File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ async fn test_abort_task_that_panics_on_drop_returned() {
194194 } ) ;
195195
196196 // wait for task to sleep.
197- time:: sleep ( Duration :: from_millis ( 100 ) ) . await ;
197+ time:: sleep ( Duration :: from_secs ( 1 ) ) . await ;
198198
199199 handle. abort ( ) ;
200200 assert ! ( handle. await . unwrap_err( ) . is_panic( ) ) ;
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ use std::sync::{
4949 Arc ,
5050} ;
5151use std:: task:: { Context , Poll } ;
52+ use std:: time:: Duration ;
5253use tokio_stream:: { Stream , StreamExt } ;
5354
5455struct TrackPolls < ' a > {
@@ -86,6 +87,7 @@ async fn no_extra_poll() {
8687
8788 let npolls = assert_ok ! ( rx. await ) ;
8889 nio:: task:: yield_now ( ) . await ;
90+ nio:: time:: sleep ( Duration :: from_secs ( 1 ) ) . await ;
8991
9092 // should have been polled exactly once: the initial poll
9193 assert_eq ! ( npolls. load( SeqCst ) , 1 ) ;
You can’t perform that action at this time.
0 commit comments