pub fn wait_for_notification(receiver: &TestMessageReceiver, messages: usize, duration: Duration) -> Result<(), ()> {
    let start = Instant::now();
    if let Ok(m) = receiver.recv_timeout(duration) {
        assert_eq!(m, TestMessage::TestData(messages));
        Ok(())
    } else {
        log::error!("wait_for_notification failed, started at {:#?}", start);
        log::error!("run queue len {}", executor::get_run_queue_len());
        d3::core::executor::stats::request_stats_now();
        d3::core::executor::stats::request_machine_info();
        thread::sleep(Duration::from_millis(100));
        Err(())
    }
}
// wait for a notification to arrive, indicating that a run iteration completed
wait for a notification to arrive, indicating that a run iteration completed
wait for a notification to arrive indicating that a run iteration completed
pub fn wait_for_notification(receiver: &TestMessageReceiver, messages: usize, duration: Duration) -> Result<(), ()> {
    let start = Instant::now();
    if let Ok(m) = receiver.recv_timeout(duration) {
        assert_eq!(m, TestMessage::TestData(messages));
        Ok(())
    } else {
        log::error!("wait_for_notification failed, started at {:#?}", start);
        log::error!("run queue len {}", executor::get_run_queue_len());
        d3::core::executor::stats::request_stats_now();
        d3::core::executor::stats::request_machine_info();
        thread::sleep(Duration::from_millis(100));
        Err(())
    }
}
pub fn wait_for_notification ( receiver : & TestMessageReceiver , messages : usize , duration : Duration ) -> Result < ( ) , ( ) > { let start = Instant :: now ( ) ; if let Ok ( m ) = receiver . recv_timeout ( duration ) { assert_eq ! ( m TestMessage TestData ( messages ) ) ; Ok ( ( ) ) } else { log :: error ! ( " " start ) ; log :: error ! ( " " executor get_run_queue_len ( ) ) ; d3 :: core :: executor :: stats :: request_stats_now ( ) ; d3 :: core :: executor :: stats :: request_machine_info ( ) ; thread :: sleep ( Duration :: from_millis ( 100 ) ) ; Err ( ( ) ) } }
wait for a notification to arrive, indicating that a run iteration completed
wait for a notification to arrive indicating that a run iteration completed
receiver
&TestMessageReceiver
messages
usize
duration
Duration