(t *testing.T)
| 277 | } |
| 278 | |
| 279 | func TestBashTool_ConcurrentExecution(t *testing.T) { |
| 280 | tool, err := NewBashTool(nil) |
| 281 | if err != nil { |
| 282 | t.Fatalf("Failed to create Bash tool: %v", err) |
| 283 | } |
| 284 | |
| 285 | concurrency := 5 |
| 286 | result := RunConcurrentTest(concurrency, func() error { |
| 287 | input := map[string]any{ |
| 288 | "command": "echo 'Concurrent test'", |
| 289 | } |
| 290 | result := ExecuteToolWithInput(t, tool, input) |
| 291 | if !result["ok"].(bool) { |
| 292 | return errors.New("Tool execution failed") |
| 293 | } |
| 294 | return nil |
| 295 | }) |
| 296 | |
| 297 | if result.ErrorCount > 0 { |
| 298 | t.Errorf("Concurrent bash execution failed: %d errors out of %d attempts", |
| 299 | result.ErrorCount, concurrency) |
| 300 | } |
| 301 | |
| 302 | t.Logf("Concurrent bash execution completed: %d success, %d errors in %v", |
| 303 | result.SuccessCount, result.ErrorCount, result.Duration) |
| 304 | } |
| 305 | |
| 306 | func TestBashTool_DifferentShellTypes(t *testing.T) { |
| 307 | tool, err := NewBashTool(nil) |
nothing calls this directly
no test coverage detected