aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-09-07 22:00:04 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-09-17 22:04:23 +0300
commit28d072d893d8cdeed6e697beadf1a712917e52b1 (patch)
tree2e2589ff03b6803719c1ea1f85c97357a97fe9ba /src/tests
parent276275ff76d79bc6489c2ddffea13845ac6699fb (diff)
downloadniri-28d072d893d8cdeed6e697beadf1a712917e52b1.tar.gz
niri-28d072d893d8cdeed6e697beadf1a712917e52b1.tar.bz2
niri-28d072d893d8cdeed6e697beadf1a712917e52b1.zip
tests/client: Check and panic on protocol error
Otherwise it keeps inf-looping.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/client.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tests/client.rs b/src/tests/client.rs
index c56b7678..d118e472 100644
--- a/src/tests/client.rs
+++ b/src/tests/client.rs
@@ -199,6 +199,10 @@ impl Client {
self.event_loop
.dispatch(Duration::ZERO, &mut self.state)
.unwrap();
+
+ if let Some(error) = self.connection.protocol_error() {
+ panic!("{error}");
+ }
}
pub fn send_sync(&self) -> Arc<SyncData> {