MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestLoop_SetMaxIterations

Function TestLoop_SetMaxIterations

internal/loop/loop_test.go:382–394  ·  view source on GitHub ↗

TestLoop_SetMaxIterations tests setting max iterations at runtime.

(t *testing.T)

Source from the content-addressed store, hash-verified

380
381// TestLoop_SetMaxIterations tests setting max iterations at runtime.
382func TestLoop_SetMaxIterations(t *testing.T) {
383 l := NewLoop("/test/prd.json", "test", 5, testProvider)
384
385 if l.MaxIterations() != 5 {
386 t.Errorf("Expected initial maxIter 5, got %d", l.MaxIterations())
387 }
388
389 l.SetMaxIterations(10)
390
391 if l.MaxIterations() != 10 {
392 t.Errorf("Expected maxIter 10 after set, got %d", l.MaxIterations())
393 }
394}
395
396// TestDefaultRetryConfig tests the default retry configuration.
397func TestDefaultRetryConfig(t *testing.T) {

Callers

nothing calls this directly

Calls 3

MaxIterationsMethod · 0.95
SetMaxIterationsMethod · 0.95
NewLoopFunction · 0.85

Tested by

no test coverage detected