pub async fn await_log(party: Party, log: TestLogs) -> Result<(), anyhow::Error> {
    loop {
        let result = get_logs(LogType::Info, party);
        if result?.contains(&log.to_string()) {
            return Ok(());
        }
        tokio::time::sleep(tokio::time::Duration::from_secs(1)).await;
    }
}
/// Wait for the log file to contain a specific entry.
///
/// This checks the log every 1 second; refactor if greater granularity is needed.
Wait for the log file to contain a specific entry.
This checks the log every 1 second; refactor if greater granularity is needed.
Wait for the log file to contain a specific entry . This checks the log every 1 second ; refactor if greater granularity is needed .
pub async fn await_log(party: Party, log: TestLogs) -> Result<(), anyhow::Error> {
    loop {
        let result = get_logs(LogType::Info, party);
        if result?.contains(&log.to_string()) {
            return Ok(());
        }
        tokio::time::sleep(tokio::time::Duration::from_secs(1)).await;
    }
}
pub async fn await_log ( party : Party , log : TestLogs ) -> Result < ( ) , anyhow :: Error > { loop { let result = get_logs ( LogType :: Info , party ) ; if result ? . contains ( & log . to_string ( ) ) { return Ok ( ( ) ) ; } tokio :: time :: sleep ( tokio :: time :: Duration :: from_secs ( 1 ) ) . await ; } }
Wait for the log file to contain a specific entry.
Wait for the log file to contain a specific entry .
party
Party
log
TestLogs
party
Party
log
TestLogs