The new Gitea CI (ci-workflows node.yaml) failed once on develop: OllamaProvider > complete > throws connection refused message when Ollama is not running timed out at 5000 ms. It runs the default 3 retries, whose jittered backoff (up to 1+2+4 s at random) can exceed the Vitest timeout.
Keep the retries (they cover the transport-retry branches the coverage gate counts) and assert all 4 attempts, but stub Math.random to 0 so the backoff is immediate. (A first attempt with maxRetries: 0 dropped branch coverage to 78.87% < 79%.)
The new Gitea CI (ci-workflows node.yaml) failed once on develop: `OllamaProvider > complete > throws connection refused message when Ollama is not running` timed out at 5000 ms. It runs the default 3 retries, whose jittered backoff (up to 1+2+4 s at random) can exceed the Vitest timeout.
Keep the retries (they cover the transport-retry branches the coverage gate counts) and assert all 4 attempts, but stub `Math.random` to 0 so the backoff is immediate. (A first attempt with `maxRetries: 0` dropped branch coverage to 78.87% < 79%.)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The test used the default 3 retries, whose jittered backoff (up to 1+2+4 s)
can exceed the 5 s Vitest timeout, so it failed intermittently in CI. Use
maxRetries: 0 like the other single-attempt error tests; retry behavior is
covered by the retry tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
maxRetries: 0 dropped the transport-retry branches below the 79% branch
coverage threshold. Keep the default retries (and assert all 4 attempts) but
stub Math.random to 0 so the backoff is immediate and deterministic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
james.maes
changed title from test: make the Ollama connection-refused test single-attempt to test: make the Ollama connection-refused test deterministic2026-11-07 23:49:43 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The new Gitea CI (ci-workflows node.yaml) failed once on develop:
OllamaProvider > complete > throws connection refused message when Ollama is not runningtimed out at 5000 ms. It runs the default 3 retries, whose jittered backoff (up to 1+2+4 s at random) can exceed the Vitest timeout.Keep the retries (they cover the transport-retry branches the coverage gate counts) and assert all 4 attempts, but stub
Math.randomto 0 so the backoff is immediate. (A first attempt withmaxRetries: 0dropped branch coverage to 78.87% < 79%.)🤖 Generated with Claude Code
test: make the Ollama connection-refused test single-attemptto test: make the Ollama connection-refused test deterministic