Skip to content

Commit 5ab3b2d

Browse files
alexhancockDaleSeo
andauthored
Update conformance/src/bin/server.rs
Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com>
1 parent 458b689 commit 5ab3b2d

1 file changed

Lines changed: 7 additions & 39 deletions

File tree

conformance/src/bin/server.rs

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -289,45 +289,13 @@ impl ServerHandler for ConformanceServer {
289289
meta: None,
290290
}),
291291

292-
"test_tool_with_logging" => {
293-
// Send 3 log notifications at info level with delays
294-
let _ = cx
295-
.peer
296-
.notify_logging_message(LoggingMessageNotificationParam {
297-
level: LoggingLevel::Info,
298-
logger: Some("conformance-server".into()),
299-
data: json!("Tool execution started"),
300-
})
301-
.await;
302-
303-
tokio::time::sleep(tokio::time::Duration::from_millis(50)).await;
304-
305-
let _ = cx
306-
.peer
307-
.notify_logging_message(LoggingMessageNotificationParam {
308-
level: LoggingLevel::Info,
309-
logger: Some("conformance-server".into()),
310-
data: json!("Tool processing data"),
311-
})
312-
.await;
313-
314-
tokio::time::sleep(tokio::time::Duration::from_millis(50)).await;
315-
316-
let _ = cx
317-
.peer
318-
.notify_logging_message(LoggingMessageNotificationParam {
319-
level: LoggingLevel::Info,
320-
logger: Some("conformance-server".into()),
321-
data: json!("Tool execution completed"),
322-
})
323-
.await;
324-
325-
Ok(CallToolResult {
326-
content: vec![Content::text("Logging test completed")],
327-
structured_content: None,
328-
is_error: None,
329-
meta: None,
330-
})
292+
for msg in ["Tool execution started", "Tool processing data", "Tool execution completed"] {
293+
let _ = cx.peer.notify_logging_message(LoggingMessageNotificationParam {
294+
level: LoggingLevel::Info,
295+
logger: Some("conformance-server".into()),
296+
data: json!(msg),
297+
}).await;
298+
tokio::time::sleep(Duration::from_millis(50)).await;
331299
}
332300

333301
"test_error_handling" => Ok(CallToolResult {

0 commit comments

Comments
 (0)