From abdefa33886e442f5a7a87bc9db70e8193a5cf85 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Wed, 11 Mar 2026 11:48:22 +0100 Subject: [PATCH] test(appd): add QueryAppState dispatch test for unknown session returning NotFound --- crates/weft-appd/src/main.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/weft-appd/src/main.rs b/crates/weft-appd/src/main.rs index 4815d71..270a97c 100644 --- a/crates/weft-appd/src/main.rs +++ b/crates/weft-appd/src/main.rs @@ -454,6 +454,19 @@ mod tests { )); } + #[tokio::test] + async fn dispatch_query_app_state_unknown_returns_not_found() { + let reg = make_registry(); + let resp = dispatch(Request::QueryAppState { session_id: 9999 }, ®).await; + assert!(matches!( + resp, + Response::AppState { + state: AppStateKind::NotFound, + .. + } + )); + } + #[test] fn registry_launch_increments_id() { let mut reg = SessionRegistry::default();