diff --git a/roles/tests-integration/lib/sniffer.rs b/roles/tests-integration/lib/sniffer.rs index 72abc8e1e..109934df6 100644 --- a/roles/tests-integration/lib/sniffer.rs +++ b/roles/tests-integration/lib/sniffer.rs @@ -456,6 +456,22 @@ impl Sniffer { sleep(Duration::from_secs(1)).await; } } + + pub async fn includes_message_type( + &self, + message_direction: MessageDirection, + message_type: u8, + ) -> bool { + let ret = match message_direction { + MessageDirection::ToDownstream => { + self.messages_from_upstream.has_message_type(message_type) + } + MessageDirection::ToUpstream => { + self.messages_from_downstream.has_message_type(message_type) + } + }; + ret + } } // Utility macro to assert that the downstream and upstream roles have sent specific messages.