(t *testing.T)
| 25 | } |
| 26 | |
| 27 | func 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 | |
| 34 | func TestRenderSession_BreakerTripsAfterThreshold(t *testing.T) { |
| 35 | s := &renderSession{} |