MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / waitForCompletedTool

Function waitForCompletedTool

test/tools_executor_parity_test.go:366–384  ·  view source on GitHub ↗
(t *testing.T, executor *agent.StreamingToolExecutor, toolID string)

Source from the content-addressed store, hash-verified

364 if !executor.AddTool(coretools.ToolCall{ID: "block-1", Name: "blocking_abort", Input: map[string]any{}}) {
365 t.Fatal("expected blocking sibling tool to start immediately")
366 }
367 <-started
368 if !<-sawAbortEvent {
369 t.Fatal("expected executor to inject per-slot abort_event into tool context")
370 }
371 if !executor.AddTool(coretools.ToolCall{ID: "fail-1", Name: "fail_abort", Input: map[string]any{}}) {
372 t.Fatal("expected failing sibling tool to start immediately")
373 }
374
375 waitForCompletedTool(t, executor, "fail-1")
376 executor.AbortSiblings("fail-1")
377 results := executor.GetRemainingResults(context.Background())
378
379 var abortContent string
380 for _, result := range results {
381 if result["tool_use_id"] == "block-1" {
382 abortContent, _ = result["content"].(string)
383 break
384 }
385 }
386 expected := "Execution aborted — sibling bash tool 'fail_abort' (fail-1) failed."
387 if abortContent != expected {

Calls 2

GetCompletedResultsMethod · 0.80
WaitForActivityMethod · 0.80

Tested by

no test coverage detected