fixed test compilation on main branch (#6512)

This commit is contained in:
Lifei Zhou
2026-01-16 01:48:54 +11:00
committed by GitHub
parent 06dcb091e2
commit 7c3f41e977
2 changed files with 15 additions and 5 deletions
@@ -925,9 +925,13 @@ mod tests {
#[tokio::test]
async fn test_record_result_outputs_valid_json() {
let temp_dir = tempfile::tempdir().unwrap();
let session_manager = Arc::new(crate::session::SessionManager::new(
temp_dir.path().to_path_buf(),
));
let context = PlatformExtensionContext {
session_id: None,
extension_manager: None,
session_manager,
};
let client = CodeExecutionClient::new(context).unwrap();
@@ -939,7 +943,12 @@ mod tests {
);
let result = client
.call_tool("execute_code", Some(args), CancellationToken::new())
.call_tool(
"execute_code",
Some(args),
McpMeta::new("test-session-id"),
CancellationToken::new(),
)
.await
.unwrap();