Lines Matching refs:rt

40         let mut rt = AckTimer::new(Arc::downgrade(&obs), ACK_INTERVAL);  in test_ack_timer_start_and_stop()  localVariable
43 let ok = rt.start(); in test_ack_timer_start_and_stop()
45 assert!(rt.is_running(), "should be running"); in test_ack_timer_start_and_stop()
48 rt.stop(); in test_ack_timer_start_and_stop()
49 assert!(!rt.is_running(), "should not be running"); in test_ack_timer_start_and_stop()
62 let ok = rt.start(); in test_ack_timer_start_and_stop()
64 assert!(rt.is_running(), "should be running"); in test_ack_timer_start_and_stop()
67 rt.stop(); in test_ack_timer_start_and_stop()
68 assert!(!rt.is_running(), "should not be running"); in test_ack_timer_start_and_stop()
232 let rt = RtxTimer::new(Arc::downgrade(&obs), timer_id, PATH_MAX_RETRANS); in test_rtx_timer_callback_interval() localVariable
234 assert!(!rt.is_running().await, "should not be running"); in test_rtx_timer_callback_interval()
237 let ok = rt.start(30).await; in test_rtx_timer_callback_interval()
239 assert!(rt.is_running().await, "should be running"); in test_rtx_timer_callback_interval()
242 rt.stop().await; in test_rtx_timer_callback_interval()
243 assert!(!rt.is_running().await, "should not be running"); in test_rtx_timer_callback_interval()
259 let rt = RtxTimer::new(Arc::downgrade(&obs), timer_id, PATH_MAX_RETRANS); in test_rtx_timer_last_start_wins() localVariable
262 let ok = rt.start(interval).await; in test_rtx_timer_last_start_wins()
264 let ok = rt.start(interval * 99).await; // should ignored in test_rtx_timer_last_start_wins()
266 let ok = rt.start(interval * 99).await; // should ignored in test_rtx_timer_last_start_wins()
270 rt.stop().await; in test_rtx_timer_last_start_wins()
272 assert!(!rt.is_running().await, "should not be running"); in test_rtx_timer_last_start_wins()
287 let rt = RtxTimer::new(Arc::downgrade(&obs), timer_id, PATH_MAX_RETRANS); in test_rtx_timer_stop_right_after_start() localVariable
290 let ok = rt.start(interval).await; in test_rtx_timer_stop_right_after_start()
292 rt.stop().await; in test_rtx_timer_stop_right_after_start()
295 rt.stop().await; in test_rtx_timer_stop_right_after_start()
297 assert!(!rt.is_running().await, "should not be running"); in test_rtx_timer_stop_right_after_start()
312 let rt = RtxTimer::new(Arc::downgrade(&obs), timer_id, PATH_MAX_RETRANS); in test_rtx_timer_start_stop_then_start() localVariable
315 let ok = rt.start(interval).await; in test_rtx_timer_start_stop_then_start()
317 rt.stop().await; in test_rtx_timer_start_stop_then_start()
318 assert!(!rt.is_running().await, "should NOT be running"); in test_rtx_timer_start_stop_then_start()
319 let ok = rt.start(interval).await; in test_rtx_timer_start_stop_then_start()
321 assert!(rt.is_running().await, "should be running"); in test_rtx_timer_start_stop_then_start()
324 rt.stop().await; in test_rtx_timer_start_stop_then_start()
326 assert!(!rt.is_running().await, "should NOT be running"); in test_rtx_timer_start_stop_then_start()
341 let rt = RtxTimer::new(Arc::downgrade(&obs), timer_id, PATH_MAX_RETRANS); in test_rtx_timer_start_and_stop_in_atight_loop() localVariable
344 let ok = rt.start(30).await; in test_rtx_timer_start_and_stop_in_atight_loop()
346 assert!(rt.is_running().await, "should be running"); in test_rtx_timer_start_and_stop_in_atight_loop()
347 rt.stop().await; in test_rtx_timer_start_and_stop_in_atight_loop()
348 assert!(!rt.is_running().await, "should NOT be running"); in test_rtx_timer_start_and_stop_in_atight_loop()
370 let rt = RtxTimer::new(Arc::downgrade(&obs), timer_id, PATH_MAX_RETRANS); in test_rtx_timer_should_stop_after_rtx_failure() localVariable
381 let ok = rt.start(interval).await; in test_rtx_timer_should_stop_after_rtx_failure()
383 assert!(rt.is_running().await, "should be running"); in test_rtx_timer_should_stop_after_rtx_failure()
387 assert!(!rt.is_running().await, "should not be running"); in test_rtx_timer_should_stop_after_rtx_failure()
421 let rt = RtxTimer::new(Arc::downgrade(&obs), timer_id, 0); in test_rtx_timer_should_not_stop_if_max_retrans_is_zero() localVariable
432 let ok = rt.start(interval).await; in test_rtx_timer_should_not_stop_if_max_retrans_is_zero()
434 assert!(rt.is_running().await, "should be running"); in test_rtx_timer_should_not_stop_if_max_retrans_is_zero()
438 assert!(rt.is_running().await, "should still be running"); in test_rtx_timer_should_not_stop_if_max_retrans_is_zero()
453 rt.stop().await; in test_rtx_timer_should_not_stop_if_max_retrans_is_zero()
469 let rt = RtxTimer::new(Arc::downgrade(&obs), timer_id, PATH_MAX_RETRANS); in test_rtx_timer_stop_timer_that_is_not_running_is_noop() localVariable
472 rt.stop().await; in test_rtx_timer_stop_timer_that_is_not_running_is_noop()
475 let ok = rt.start(20).await; in test_rtx_timer_stop_timer_that_is_not_running_is_noop()
477 assert!(rt.is_running().await, "must be running"); in test_rtx_timer_stop_timer_that_is_not_running_is_noop()
480 rt.stop().await; in test_rtx_timer_stop_timer_that_is_not_running_is_noop()
481 assert!(!rt.is_running().await, "must be false"); in test_rtx_timer_stop_timer_that_is_not_running_is_noop()
495 let rt = RtxTimer::new(Arc::downgrade(&obs), timer_id, PATH_MAX_RETRANS); in test_rtx_timer_closed_timer_wont_start() localVariable
497 let ok = rt.start(20).await; in test_rtx_timer_closed_timer_wont_start()
499 assert!(rt.is_running().await, "must be running"); in test_rtx_timer_closed_timer_wont_start()
501 rt.stop().await; in test_rtx_timer_closed_timer_wont_start()
502 assert!(!rt.is_running().await, "must be false"); in test_rtx_timer_closed_timer_wont_start()
506 assert!(!rt.is_running().await, "must not be running"); in test_rtx_timer_closed_timer_wont_start()