Skip to content

Commit

Permalink
Add Sniffer::includes_message_type fn
Browse files Browse the repository at this point in the history
  • Loading branch information
jbesraa committed Jan 9, 2025
1 parent a053dc7 commit aa3f30a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions roles/tests-integration/lib/sniffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit aa3f30a

Please sign in to comment.