test: macOSのMCPテスト修正を取り込む (#454)

This commit is contained in:
haranishi
2026-10-13 21:50:25 +09:00
+3
View File
@@ -172,6 +172,9 @@ mod tests {
Err(e) => panic!("accept failed: {e}"),
}
};
// Accepted sockets can inherit the listener's nonblocking mode. The server
// waits for both requests with timeouts, rather than reading before they arrive.
stream.set_nonblocking(false).unwrap();
stream.set_read_timeout(Some(Duration::from_secs(2))).unwrap();
stream.set_write_timeout(Some(Duration::from_secs(2))).unwrap();
let mut reader = BufReader::new(stream.try_clone().unwrap());