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

Function test_stdio_transport_spawn_echo

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

Source from the content-addressed store, hash-verified

254
255 #[tokio::test]
256 async fn test_stdio_transport_spawn_echo() {
257 // Use a simple command that exists on most systems
258 let result = StdioTransport::spawn("cat", &[], &HashMap::new()).await;
259
260 if let Ok(transport) = result {
261 assert!(transport.is_connected());
262 transport.close().await.unwrap();
263 assert!(!transport.is_connected());
264 }
265 // If cat doesn't exist, that's fine - skip the test
266 }
267
268 #[tokio::test]
269 async fn test_stdio_transport_is_connected_initial() {

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected