test: include unexpected event in panic (#9087)

This commit is contained in:
Matthias Seitz
2024-06-25 14:30:47 +02:00
committed by GitHub
parent e2015143b3
commit c3cae95431

View File

@ -23,7 +23,7 @@ impl NetworkTestContext {
match self.network_events.next().await { match self.network_events.next().await {
Some(NetworkEvent::PeerAdded(_)) => (), Some(NetworkEvent::PeerAdded(_)) => (),
_ => panic!("Expected a peer added event"), ev => panic!("Expected a peer added event, got: {ev:?}"),
} }
} }
@ -38,7 +38,7 @@ impl NetworkTestContext {
Some(NetworkEvent::SessionEstablished { remote_addr, .. }) => { Some(NetworkEvent::SessionEstablished { remote_addr, .. }) => {
info!(?remote_addr, "Session established") info!(?remote_addr, "Session established")
} }
_ => panic!("Expected session established event"), ev => panic!("Expected session established event, got: {ev:?}"),
} }
} }
} }