pub fn wait_for_machine_teardown(test_name: &str, machine_count: usize) -> Result<(), ()> {
    let start = Instant::now();
    while start.elapsed() < Duration::from_secs(10) {
        thread::sleep(Duration::from_nanos(50));
        if executor::get_machine_count() <= machine_count {
            return Ok(());
        }
    }
    if log_enabled!(log::Level::Error) {
        log::error!(
            "wait_for_machine_teardown failed: for {} count={}, expecting={}",
            test_name,
            executor::get_machine_count(),
            machine_count
        );
    } else {
        println!(
            "wait_for_machine_teardown failed: count={}, expecting={}",
            executor::get_machine_count(),
            machine_count
        );
    }
    Err(())
}
// wait for the machine count to be reduced to the provided count
wait for the machine count to be reduced to the provided count
wait for the machine count to be reduced to the provided count
pub fn wait_for_machine_teardown(test_name: &str, machine_count: usize) -> Result<(), ()> {
    let start = Instant::now();
    while start.elapsed() < Duration::from_secs(10) {
        thread::sleep(Duration::from_nanos(50));
        if executor::get_machine_count() <= machine_count {
            return Ok(());
        }
    }
    if log_enabled!(log::Level::Error) {
        log::error!(
            "wait_for_machine_teardown failed: for {} count={}, expecting={}",
            test_name,
            executor::get_machine_count(),
            machine_count
        );
    } else {
        println!(
            "wait_for_machine_teardown failed: count={}, expecting={}",
            executor::get_machine_count(),
            machine_count
        );
    }
    Err(())
}
pub fn wait_for_machine_teardown ( test_name : & str , machine_count : usize ) -> Result < ( ) , ( ) > { let start = Instant :: now ( ) ; while start . elapsed ( ) < Duration :: from_secs ( 10 ) { thread :: sleep ( Duration :: from_nanos ( 50 ) ) ; if executor :: get_machine_count ( ) <= machine_count { return Ok ( ( ) ) ; } } if log_enabled ! ( log Level Error ) { log :: error ! ( " " test_name executor get_machine_count ( ) machine_count ) ; } else { println ! ( " " executor get_machine_count ( ) machine_count ) ; } Err ( ( ) ) }
wait for the machine count to be reduced to the provided count
wait for the machine count to be reduced to the provided count
test_name
&str
machine_count
usize