forge
Explore
Log in

Don't you dare go Hollow

tests/client: Check and panic on protocol error

Browse files at this commit

28d072d893d8cdeed6e697beadf1a712917e52b1Ivan MolodetskikhParent: 276275f
Otherwise it keeps inf-looping.
src/tests/client.rsmodified+4 -0
@@ -199,6 +199,10 @@ impl Client {
199 self.event_loop199 self.event_loop
200 .dispatch(Duration::ZERO, &mut self.state)200 .dispatch(Duration::ZERO, &mut self.state)
201 .unwrap();201 .unwrap();
202+
203+ if let Some(error) = self.connection.protocol_error() {
204+ panic!("{error}");
205+ }
202 }206 }
203 207
204 pub fn send_sync(&self) -> Arc<SyncData> {208 pub fn send_sync(&self) -> Arc<SyncData> {