fn receive(&self) -> Result<TestMessage, TestClientErrorCode> {
        match tokio::task::block_in_place(move || {
            self.receiver
                .recv_timeout(time::Duration::from_millis(RECV_TIMEOUT_MS))
        }) {
            Ok(msg) => Ok(msg),
            Err(RecvTimeoutError::Timeout) => {
                warn!(self.log, "Message receive timed out");
                Err(TestClientErrorCode::Timeout)
            }
            Err(e) => {
                warn!(self.log, "Failed to receive message: {:?}", e);
                Err(TestClientErrorCode::UnknownFailure)
            }
        }
    }
// Reads the next message from the channel
Reads the next message from the channel
Reads the next message from the channel
fn receive(&self) -> Result<TestMessage, TestClientErrorCode> {
        match tokio::task::block_in_place(move || {
            self.receiver
                .recv_timeout(time::Duration::from_millis(RECV_TIMEOUT_MS))
        }) {
            Ok(msg) => Ok(msg),
            Err(RecvTimeoutError::Timeout) => {
                warn!(self.log, "Message receive timed out");
                Err(TestClientErrorCode::Timeout)
            }
            Err(e) => {
                warn!(self.log, "Failed to receive message: {:?}", e);
                Err(TestClientErrorCode::UnknownFailure)
            }
        }
    }
fn receive ( & self ) -> Result < TestMessage , TestClientErrorCode > { match tokio :: task :: block_in_place ( move | | { self . receiver . recv_timeout ( time :: Duration :: from_millis ( RECV_TIMEOUT_MS ) ) } ) { Ok ( msg ) => Ok ( msg ) , Err ( RecvTimeoutError :: Timeout ) => { warn ! ( self log " " ) ; Err ( TestClientErrorCode :: Timeout ) } Err ( e ) => { warn ! ( self log " " e ) ; Err ( TestClientErrorCode :: UnknownFailure ) } } }
Reads the next message from the channel
Reads the next message from the channel
&self
&self