MCPcopy Create free account
hub / github.com/celer-pkg/celer / TestExecutor_WithRetry_RetriesOnFailure

Function TestExecutor_WithRetry_RetriesOnFailure

pkgs/cmd/exec_test.go:208–217  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

206}
207
208func TestExecutor_WithRetry_RetriesOnFailure(t *testing.T) {
209 executor := NewExecutor("[test retry]", "false").WithRetry(3)
210 err := executor.Execute()
211 if err == nil {
212 t.Fatal("expected error from failing command")
213 }
214 if !strings.Contains(err.Error(), "failed after 3 attempts") {
215 t.Errorf("error should mention 'failed after 3 attempts', got: %v", err)
216 }
217}
218
219func TestExecutor_WithRetry_NoRetryWhenZero(t *testing.T) {
220 executor := NewExecutor("[test]", "false") // no WithRetry

Callers

nothing calls this directly

Calls 4

NewExecutorFunction · 0.85
WithRetryMethod · 0.80
ExecuteMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected