MCPcopy Create free account
hub / github.com/docker/docker-agent / TestGetEffectiveCooldown

Function TestGetEffectiveCooldown

pkg/runtime/fallback_test.go:372–380  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

370}
371
372func TestGetEffectiveCooldown(t *testing.T) {
373 t.Parallel()
374
375 agentNoConfig := agent.New("no-config", "test")
376 assert.Equal(t, modelerrors.DefaultCooldown, getEffectiveCooldown(agentNoConfig), "should use default cooldown")
377
378 agentWithConfig := agent.New("with-config", "test", agent.WithFallbackCooldown(5*time.Minute))
379 assert.Equal(t, 5*time.Minute, getEffectiveCooldown(agentWithConfig), "should use configured cooldown")
380}
381
382func TestGetEffectiveRetries(t *testing.T) {
383 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.92
WithFallbackCooldownFunction · 0.92
getEffectiveCooldownFunction · 0.85

Tested by

no test coverage detected