MCPcopy Create free account
hub / github.com/diillson/chatcli / TestRenderSession_CooldownGate

Function TestRenderSession_CooldownGate

cli/plugins/webfetch_render_test.go:27–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25}
26
27func TestRenderSession_CooldownGate(t *testing.T) {
28 s := &renderSession{cooldownUntil: time.Now().Add(time.Minute)}
29 if _, err := s.acquire(); err == nil || !strings.Contains(err.Error(), "suspended") {
30 t.Fatalf("acquire during cooldown must fail fast with the suspension message, got %v", err)
31 }
32}
33
34func TestRenderSession_BreakerTripsAfterThreshold(t *testing.T) {
35 s := &renderSession{}

Callers

nothing calls this directly

Calls 3

acquireMethod · 0.95
AddMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected