fix: stamp server info on graceful subscription results (#1078)
* fix: stamp server info on graceful subscription results * fix: expose subscription server info metadata --------- Co-authored-by: mrcs64 <9069178+mrcs64@users.noreply.github.com>
This commit is contained in:
parent
4e361b715f
commit
cb50ae7890
1 changed files with 94 additions and 26 deletions
|
|
@ -51,6 +51,7 @@ impl ServerHandler for ToolsOnlyServer {
|
|||
.enable_tool_list_changed()
|
||||
.build(),
|
||||
)
|
||||
.with_server_info(Implementation::new("tools-only-server", "1.0.0"))
|
||||
}
|
||||
|
||||
fn accepted_subscription_filter(
|
||||
|
|
@ -440,6 +441,13 @@ async fn listen_exposes_acknowledged_filter_and_graceful_result() -> anyhow::Res
|
|||
result.meta.subscription_id().as_ref(),
|
||||
Some(subscription.id())
|
||||
);
|
||||
assert_eq!(
|
||||
result
|
||||
.meta
|
||||
.server_info()
|
||||
.expect("graceful result should contain valid server info"),
|
||||
Implementation::new("tools-only-server", "1.0.0")
|
||||
);
|
||||
|
||||
client.cancel().await?;
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Reference in a new issue