Skip to content

Commit 34ba391

Browse files
committed
test: isolate probe timeout and finish MCP signature parity
1 parent ccfa9b7 commit 34ba391

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

‎src/main/java/io/github/easy4j/comfy/mcp/ComfyMcpClient.java‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,12 @@ public ComfyMcpCallResult watchJob(String promptId, double timeoutSeconds) {
258258
public ComfyMcpCallResult getQueue() { return job("queue", null, null); }
259259

260260
public ComfyMcpCallResult systemStats() { return callTool("system_stats", null); }
261-
public ComfyMcpCallResult freeMemory() { return callTool("free_memory", null); }
261+
public ComfyMcpCallResult freeMemory() { return freeMemory(true, null); }
262+
public ComfyMcpCallResult freeMemory(boolean unloadModels, Boolean freeMemory) {
263+
Map<String, Object> args = params("unload_models", Boolean.valueOf(unloadModels));
264+
putIfNotNull(args, "free_memory", freeMemory);
265+
return callTool("free_memory", args);
266+
}
262267

263268
public ComfyMcpCallResult fetchOutputs(String promptId, String outDir,
264269
boolean urlOnly, boolean inlineImages) {
@@ -309,7 +314,12 @@ public ComfyMcpCallResult getLogs(int tail, Integer port) {
309314
return callTool("get_logs", args);
310315
}
311316

312-
public ComfyMcpCallResult discover() { return callTool("discover", null); }
317+
public ComfyMcpCallResult discover() { return discover(true, ""); }
318+
public ComfyMcpCallResult discover(boolean schemasOnly, String command) {
319+
return callTool("discover", params(
320+
"schemas_only", Boolean.valueOf(schemasOnly),
321+
"command", nullToEmpty(command)));
322+
}
313323
public ComfyMcpCallResult which() { return callTool("which", null); }
314324

315325
public ComfyMcpCallResult project(String action) {

‎src/test/resources/comfy-slow.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/sh
2-
sleep 5
2+
exec sleep 5

0 commit comments

Comments
 (0)