From c77024cdf5a99baa3b6efc1bef4f93d2668d7f5d Mon Sep 17 00:00:00 2001 From: "glm-5.2" Date: Thu, 2 Jul 2026 10:10:42 +0000 Subject: [PATCH] fix(http): update websocket subscription tests to expect call.responded (dispatch_requested now routes Subscription via invoke_streaming) --- crates/alknet-http/src/websocket/upgrade.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/crates/alknet-http/src/websocket/upgrade.rs b/crates/alknet-http/src/websocket/upgrade.rs index d8c6c97..8577a2c 100644 --- a/crates/alknet-http/src/websocket/upgrade.rs +++ b/crates/alknet-http/src/websocket/upgrade.rs @@ -779,10 +779,11 @@ mod tests { let out = handle_inbound_envelope(&dp, &conn, request) .await .expect("response"); - assert_eq!(out.r#type, EVENT_ERROR); + assert_eq!(out.r#type, EVENT_RESPONDED); + assert_eq!(out.id, "sub-0"); assert_eq!( - out.payload.get("code"), - Some(&serde_json::json!("INVALID_OPERATION_TYPE")) + out.payload.get("output"), + Some(&serde_json::json!({ "n": 1 })) ); } @@ -1077,10 +1078,10 @@ mod tests { MockMsg::Binary(bytes) => { let env: EventEnvelope = serde_json::from_slice(&bytes).unwrap(); assert_eq!(env.id, "sub-ws-0"); - assert_eq!(env.r#type, EVENT_ERROR); + assert_eq!(env.r#type, EVENT_RESPONDED); assert_eq!( - env.payload.get("code"), - Some(&serde_json::json!("INVALID_OPERATION_TYPE")) + env.payload.get("output"), + Some(&serde_json::json!({ "n": 1 })) ); } other => panic!("expected binary, got {other:?}"),