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

Function test_stdio_transport_double_close

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

Source from the content-addressed store, hash-verified

304
305 #[tokio::test]
306 async fn test_stdio_transport_double_close() {
307 let result = StdioTransport::spawn("cat", &[], &HashMap::new()).await;
308 if let Ok(transport) = result {
309 transport.close().await.unwrap();
310 // Second close should not panic
311 let result = transport.close().await;
312 assert!(result.is_ok());
313 }
314 }
315
316 #[tokio::test]
317 async fn test_stdio_transport_request_after_close() {

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected