Skip to content

fix(aibridge): increase circuit breaker test timeout to prevent flake#26519

Open
ssncferreira wants to merge 1 commit into
mainfrom
fix/circuit-breaker-flaky-test
Open

fix(aibridge): increase circuit breaker test timeout to prevent flake#26519
ssncferreira wants to merge 1 commit into
mainfrom
fix/circuit-breaker-flaky-test

Conversation

@ssncferreira

@ssncferreira ssncferreira commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

TestCircuitBreaker_FullRecoveryCycle/OpenAI flaked once on macOS CI. The most likely cause is that the circuit breaker Timeout (open-to-half-open transition) was too short relative to the time between test phases. On a slow runner, the breaker could transition to half-open before the test verified it was still open, so the request went through as a half-open probe instead of being rejected.

Increases Timeout to testutil.IntervalSlow (1 second) across all circuit breaker integration tests.

Note: Ideally, these tests would use a mock clock for deterministic timing, but https://github.com/sony/gobreaker (the library used for circuit breaker logic) uses real time internally and doesn't expose a clock interface.

Closes https://linear.app/codercom/issue/AIGOV-438

Generated with Coder Agents on behalf of @ssncferreira

@linear-code

linear-code Bot commented Jun 18, 2026

Copy link
Copy Markdown

AIGOV-438

@ssncferreira ssncferreira force-pushed the fix/circuit-breaker-flaky-test branch 2 times, most recently from ee591f0 to 9bf9ea7 Compare June 18, 2026 15:51
@ssncferreira ssncferreira force-pushed the fix/circuit-breaker-flaky-test branch from 9bf9ea7 to 4ac65a6 Compare June 18, 2026 15:53
@ssncferreira ssncferreira marked this pull request as ready for review June 18, 2026 16:57
@ssncferreira ssncferreira requested review from Copilot, dannykopping and pawbana and removed request for Copilot June 18, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant