MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_stdio_transport_notify_after_close

Function test_stdio_transport_notify_after_close

core/src/mcp/transport/stdio.rs:330–340  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

328
329 #[tokio::test]
330 async fn test_stdio_transport_notify_after_close() {
331 let result = StdioTransport::spawn("cat", &[], &HashMap::new()).await;
332 if let Ok(transport) = result {
333 transport.close().await.unwrap();
334
335 let notification = JsonRpcNotification::new("test", None);
336 let result = transport.notify(notification).await;
337 assert!(result.is_err());
338 assert!(result.unwrap_err().to_string().contains("not connected"));
339 }
340 }
341
342 #[test]
343 fn test_json_rpc_request_creation() {

Callers

nothing calls this directly

Calls 2

closeMethod · 0.45
notifyMethod · 0.45

Tested by

no test coverage detected