tests/client: Check and panic on protocol error
Browse files at this commit28d072d893d8cdeed6e697beadf1a712917e52b1Parent: 276275f1 changed file +4 -0
- src/tests/client.rs +4 -0
src/tests/client.rsmodified+4 -0
| @@ -199,6 +199,10 @@ impl Client { | |||
| 199 | self.event_loop | 199 | 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> { |