From e5ec05ce2c73f3943750b6b93b2accc41a755dc6 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Wed, 11 Mar 2026 11:38:33 +0100 Subject: [PATCH] test(appd): assert AppState::Stopped broadcast in supervisor integration test supervisor_transitions_through_ready_to_stopped now checks both broadcast messages: AppReady (on READY signal) and AppState::Stopped (on process exit), covering the path added in 3315b15. --- crates/weft-appd/src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/weft-appd/src/main.rs b/crates/weft-appd/src/main.rs index d50fda0..4815d71 100644 --- a/crates/weft-appd/src/main.rs +++ b/crates/weft-appd/src/main.rs @@ -570,6 +570,12 @@ mod tests { Ok(Response::AppReady { session_id: sid, .. }) if sid == session_id )); + let stopped = rx.try_recv(); + assert!(matches!( + stopped, + Ok(Response::AppState { session_id: sid, state: AppStateKind::Stopped }) if sid == session_id + )); + let _ = std::fs::remove_file(&script); // SAFETY: single-threaded test; restoring env to prior state. unsafe {